If the ternary expression is always used to decide between these two values you might want to store the value directly as a constant instead so that you don't need to use the ternary operator at all.
1 2 3 4 5
#if defined(FOO)
constint x = 0;
#else
constint x = 1;
#endif
hi Peter,
Thanks a lot for your answer!
Actually, I'm on a codebase in a team where I can't really add such modifications in the main headers of the project. I should have precised it in my message :/.
But indeed, your solution may be very useful if I add it in a local file.
I wondered if there was some preprocessor magic that allowed such a feat but I'm under the impression that the C preprocessor can't do that yet.
thanks again :)