conditional compilation - Can complex logical expressions be used in #ifdef in C++? -


i have found 1 can combine multiple #ifdefs using command #if defined(stuff) way:

#if defined(_bla1) || defined(_bla2) 

or

#if defined(_bla1) && defined(_bla2) 

but can use parentheses combine more refined definitions, such as:

#if (defined(_bla1) || defined(_bla2)) && (defined(_bla3) || defined(_bla4)) 

?

yes, works fine. have tested in xcode, uses llvm compiler.


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -