Name

#elif directive — Else-if for conditional compilation

Synopsis

#elif constant-expression
            

The #elif directive marks a region of conditional compilation. Every #elif must be paired with an introductory directive: #if, #ifdef, or #ifndef. If the initial condition was false (0), and every subsequent #elif condition is false, and constant-expression is true (nonzero), subsequent statements are compiled until the next #elif, #else, or #endif directive is reached for this level of nesting.

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.