https://llvm.org/bugs/show_bug.cgi?id=26869
Bug ID: 26869 Summary: error: declaration of constexpr static data member 'var' requires an initializer Product: clang Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++11 Assignee: unassignedclangb...@nondot.org Reporter: jt...@ca.ibm.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified clang 3.6/3.8 both fail to compile the following test case while g++ can compile it successfully. -bash-4.2$ cat reduce.cpp enum E1 { e1, e2 = 3, e3 }; template <class C> struct S { static constexpr E1 var = e1; }; template <> constexpr E1 S<int>::var; -bash-4.2$ -bash-4.2$ clang++ -m64 reduce.cpp -std=c++11 -c reduce.cpp:3:34: error: declaration of constexpr static data member 'var' requires an initializer template <> constexpr E1 S<int>::var; ^ 1 error generated. -bash-4.2$ -bash-4.2$ g++ -m64 reduce.cpp -std=c++11 -c -bash-4.2$ -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs