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
This commit is contained in:
Paolo Carlini 2012-05-24 15:12:37 +00:00 committed by Paolo Carlini
parent 73fb763006
commit a5dedb5e59
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,22 @@
// 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;
}