> cat | cpp -c
#define ORDER 3
#define APPEND_ORDER(name) name ## _ ## ORDER
void APPEND_ORDER(cg)(int arg)
{}
^D
我发现在参数替换期间,宏ORDER
不正在展开。但这就是我想要的!
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
void cg_ORDER(int arg)
{}
期望的输出:
void cg_3(int arg)
{}