您的位置:首页 > 编程语言 > C语言/C++

使用模板特化定义C++编译期警告

2010-12-23 17:14 429 查看
使用模板特化定义C++编译期警告

//-- static compile-time assertion
namespace static_assert
{
template<bool> struct FAILD;
template<> struct FAILD<true> { };
}

#define nASSERT_STATIC(exp) (static_assert::FAILD<(exp) != 0>())
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: