Redefinitions of constexpr static data members are allowed now? (but not inline const)?
问题 The following fails to compile under both gcc and clang in c++14, but succeeds with c++1z: struct Cls { static constexpr int N = 0; }; constexpr int Cls::N; constexpr int Cls::N; The C++14 error is predictable: redefinition of ‘constexpr const int Cls::N’ What changed to make this legal? I found: n4659 10.1.5 [dcl.constexpr] A function or static data member declared with the constexpr specifier is implicitly an inline function or variable So I thought it might have to do with inline variables