Commit a5dedb5e by Paolo Carlini Committed by Paolo Carlini

re PR c++/53464 (Invalid default value for non-type template parameter is accepted)

2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53464
	* g++.dg/cpp0x/constexpr-default1.C: New.

From-SVN: r187842
parent 73fb7630
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53464
* g++.dg/cpp0x/constexpr-default1.C: New.
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32080
* g++.dg/eh/goto2.C: New.
......
// PR c++/53464
// { dg-do compile { target c++11 } }
template <int value>
struct bar
{
static constexpr int get()
{
return value;
}
};
template <typename A, int value = A::get()>
struct foo
{
};
int main()
{
typedef foo<bar<0>> type;
return 0;
}
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