2015-08-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/66427
* g++.dg/cpp1y/var-templ34.C: New.
From-SVN: r226568
+2015-08-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/66427
+ * g++.dg/cpp1y/var-templ34.C: New.
+
2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/pragma_cpp_predefs_1.c: New test.
--- /dev/null
+// PR c++/66427
+// { dg-do compile { target c++14 } }
+
+template<typename T>
+struct complex {};
+
+struct plus {};
+struct multiplies {};
+
+template<typename T, typename Op>
+constexpr T identity_element;
+
+template<>
+constexpr int identity_element<int, plus> = 0;
+
+template<typename T>
+constexpr complex<T> identity_element<complex<T>, plus> = {
+ identity_element<T, plus>,
+ identity_element<T, plus>
+};