re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const")

PR c++/49176
	* g++.dg/template/const5.C: New.

From-SVN: r174356
This commit is contained in:
Jason Merrill 2011-05-27 15:32:22 -04:00 committed by Jason Merrill
parent 1fbbe7d6b2
commit 69cf9a1cfe
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2011-05-27 Jason Merrill <jason@redhat.com>
PR c++/49176
* g++.dg/template/const5.C: New.
* g++.dg/cpp0x/enum18.C: New.
* g++.dg/cpp0x/lambda/lambda-nested4.C: New.

View File

@ -0,0 +1,12 @@
// PR c++/49176
// { dg-options -std=c++0x }
struct A { static int a(); };
template<int>
struct B { static int const b; };
int f() { return B<0>::b; }
template<int I>
int const B<I>::b=A::a();