OSDN Git Service

PR c++/51186
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / nsdmi5.C
1 // { dg-options -std=c++0x }
2
3 struct X
4 {
5   int x = 5;
6   int f() { return x; }
7 };
8 struct Y : X
9 {
10   int y = this->x;
11 };
12 template <class T> struct Z : T
13 {
14   int y = this->f();
15 };
16 int main()
17 {
18   Y foo;
19   Z<X> bar;
20 }