Commit 01003b83 by Paolo Carlini Committed by Paolo Carlini

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
parent 91d0e8de
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.
......
// 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>
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment