How to make G++ preprocessor output a newline in a macro?

前端 未结 8 969
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 15:55

Is there a way in gcc/g++ 4.* to write a macro that expands into several lines?

The following code:

#define A X \\ Y

Expands into

8条回答
  •  孤城傲影
    2020-12-01 16:25

    From the docs:

    in the present implementation, the entire expansion comes out on one line

提交回复
热议问题