模拟static_assert
template<bool> struct CompileTimeError; template<> struct CompileTimeError<true>{}; #define STATIC_ASSERT(expr) \ CompileTimeError<(expr)>()
template<bool> struct CompileTimeError; template<> struct CompileTimeError<true>{}; #define STATIC_ASSERT(expr) \ CompileTimeError<(expr)>()