Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
受け取る引数に応じて異なるものに展開する C プリプロセッサ マクロを作成する方法はありますか?
#define foo() ??? /* 1 */ foo(name) /* 2 */ foo(_)
望ましい結果:
/* 1 */ int name; /* 2 */ /*ignore*/
はい、私はマクロが悪であることを知っています。私は主に好奇心からこれを求めています。