下面的代码在GCC(4.9.3)和VC++(19.00.23506)中编译得很好,但在Clang( 3.7.0)。 error: constexpr function's return type 'Foo' is not a literal type note: 'Foo' is not literal because it is not an aggregate and has no const
我赶上试图与consexpr装饰时错误“constexpr功能......不是回归语句的身体”: $ g++ -std=c++11 test.cxx -o test.exe
test.cxx: In instantiation of ‘static constexpr unsigned int MinMaxStep<min, max
, step>::ValidValue(unsigned i