mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/66427 (The compiler rejects too complex variable templates)
2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66427 * g++.dg/cpp1y/var-templ34.C: New. From-SVN: r226568
This commit is contained in:
parent
91d0e8dec9
commit
01003b8381
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
// 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>
|
||||
};
|
||||
Loading…
Reference in New Issue