Closed skirsten closed 6 years ago
#define CONCAT(a, b) a ## _ ## b #define CONCAT_MULTIPLE(prefix) CONCAT(prefix, BANANA) | CONCAT(prefix, APPLE) | CONCAT(prefix, GRAPE) #define CONCAT_NESTED(val) CONCAT(NESTED, val) #define CONCAT_MULTIPLE_NESTED(prefix) CONCAT_NESTED(CONCAT(prefix, BANANA)) | CONCAT_NESTED(CONCAT(prefix, APPLE)) | CONCAT_NESTED(CONCAT(prefix, GRAPE)) CONCAT_MULTIPLE(FOOD); CONCAT_MULTIPLE_NESTED(FOOD);
pcpp:
pcpp
FOOD_BANANA_APPLE_GRAPE | FOOD_BANANA_APPLE_GRAPE | FOOD_BANANA_APPLE_GRAPE; NESTED_FOOD_BANANA | NESTED_FOOD_BANANA_APPLE | NESTED_FOOD_BANANA_APPLE_GRAPE;
gcc, g++, clang, clang++, cl (MSVC):
gcc
g++
clang
clang++
cl
FOOD_BANANA | FOOD_APPLE | FOOD_GRAPE; NESTED_FOOD_BANANA | NESTED_FOOD_APPLE | NESTED_FOOD_GRAPE;
Its obvious whos in the wrong. I couldn't find the problem but i dont think its with the concatting and more with the macro expansion.
Fixed!
Thanks! Your project was very helpful to me. Keep it up.
pcpp
:gcc
,g++
,clang
,clang++
,cl
(MSVC):Its obvious whos in the wrong. I couldn't find the problem but i dont think its with the concatting and more with the macro expansion.