simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

EVAL(...) not working

Open ltqusst opened this issue 3 years ago • 0 comments

following macro expanded as HELLO () while it should be "Hello World". this piece of code is taken from http://saadahmad.ca/cc-preprocessor-metaprogramming-macro-basicsrules/

#define EMPTY() // This MACRO doesn't do anything
#define EVAL(...) __VA_ARGS__ // This is a simple identity macro
#define HELLO() "Hello World"

EVAL ( HELLO EMPTY() () ) 

ltqusst avatar Aug 12 '21 08:08 ltqusst