enum class test : bool { yes=true, no=false }; template< bool ok > class A { }; int main(){ A<test::yes> a; }
为什么编译失败?(g ++ 4.7)由于C++ 11枚举是强类型的,所以我们应该能够将bool枚举用作模板类型的bool参数吗?
c++ enums c++11
c++ ×1
c++11 ×1
enums ×1