#ifdef
is a preprocessor directive - in short, this means that without _cplusplus
being #define
d somewhere, your debugger is smart enough to say Hey, this is dead code - don't even try to debug it.
Preprocessor directives are lines included in the code of programs preceded by a hash sign (#). These lines are not program statements but directives for the preprocessor. The preprocessor examines the code before actual compilation of code begins and resolves all these directives before any code is actually generated by regular statements.
These preprocessor directives extend only across a single line of code. As soon as a newline character is found, the preprocessor directive is ends. No semicolon (;) is expected at the end of a preprocessor directive. The only way a preprocessor directive can extend through more than one line is by preceding the newline character at the end of the line by a backslash ().
These are super useful, and for a common example have a quick look at Include Guards. As a test to see what I mean, try adding #define _cplusplus
directly above the #ifdef
and try again.