template<bool> struct CompileTimeError;
template<> struct CompileTimeError<true>{};
#define STATIC_ASSERT(expr) \
CompileTimeError<(expr)>()
模拟static_assert
最新推荐文章于 2023-01-29 16:26:10 发布
template<bool> struct CompileTimeError;
template<> struct CompileTimeError<true>{};
#define STATIC_ASSERT(expr) \
CompileTimeError<(expr)>()