You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Note that if a compiler does not support C++23's #elifdef/#elifndef// directives then the "unexpected" block (see below) will be selected.
#ifdef CPU
std::cout << "4: no1\n";
#elifdef GPU
std::cout << "4: no2\n";
#elifndef RAM
std::cout << "4: yes\n"; // expected block
#else
std::cout << "4: no!\n"; // unexpectedly selects this block by skipping// unknown directives and "jumping" directly// from "#ifdef CPU" to this "#else" block
#endif
The text was updated successfully, but these errors were encountered:
mwichmann
changed the title
C++ scanner: add #elifdef and #elifndef
C/C++ scanner: add #elifdef and #elifndef
Apr 21, 2024
C++23 introduces #elifdef and #elifdef in the preprocessor: https://en.cppreference.com/w/cpp/preprocessor/conditional
The text was updated successfully, but these errors were encountered: