constexpr 关键字

C++11新标准规定,允许将变量声明为constexpr类型,以便由编译器来验证变量的值是否是一个常量表达式。 constexpr是在编译器判断是否是常量的。

Continue Reading...