Are preprocessor directives processed before macros are expanded?

Are preprocessor directives processed before expanding macros?

thank

+4
source share
1 answer

Yes and no. Each preprocessor directive defines its interaction with macro substitution. General rule: (C ++ 11 16/6):

The preprocessing marks in the preprocessing directive are not subject to macro-volume unless otherwise indicated.

Another important general rule is 16/1:

, : #, ( 4 ) ( , ) , . - , . , - .

( 4 ).

:

  • #if #elif , defined (16.1/4).

  • #include ; , "" <>.

  • #line ; -- #line (16.4/5)

+3

All Articles