Reputation: 10485
This little peace of code
#ifdef QA || DEBUG
do something
#endif
creates the following error:
Extra tokens at end of #ifdef directive
I tried removing one pipe, not working. Google only shows similar questions for cpp with irrelevant answers.
Any idea?
Upvotes: 1
Views: 2218
Reputation: 697
Use:
#if defined(A) || defined(B)
// do stuff
#endif
or nested condition
#ifdef A
#ifdef B
// do stuff
#endif
#endif
Upvotes: 2