There are two simple examples for this.
#ifdef A
#define xxx(...) BBBB(__VA_ARGS__)
#else
#define xxx(...)
#endif
vs.
#ifdef A
#define xxx(...) BBBB(__VA_ARGS__)
#else
static inline void xxx(){}
#endif
I preferred the second one because at the first case, sometimes unexpected problems are issued. (Just personal opinion/preference...)'Language > C&C++' 카테고리의 다른 글
| GCC macro with variable number of arguements (0) | 2012.05.08 |
|---|---|
| [C/C++/JAVA] 변수를 block중간에 선언하는 방법에 대한 단상. (0) | 2011.11.23 |
| [C/C++] Fail to build Android with g++/gcc-4.6 (Ubuntu-11.10) (0) | 2011.10.17 |
| [C/C++] func() vs. func(void) (0) | 2011.07.27 |
| [C/C++] Tips for OOP - module initialization. (0) | 2011.05.17 |