compile time assert:
#define UNIQUE(x) __unique_name##x
#define STATIC_ASSERT(expr) typedef char UNIQUE(__LINE__)[(expr)?1:-1];
compile time assert:
#define UNIQUE(x) __unique_name##x
#define STATIC_ASSERT(expr) typedef char UNIQUE(__LINE__)[(expr)?1:-1];
转载于:https://www.cnblogs.com/qsort/archive/2011/05/05/2038534.html