gcc/testsuite/g++.dg/lookup/using51.C
raw| 1 | // PR c++/51382 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Wno-deprecated" } |
| 4 | |
| 5 | template< int Value > |
| 6 | struct Base |
| 7 | { |
| 8 | enum { b_e = Value }; |
| 9 | }; |
| 10 | |
| 11 | template< typename Type > |
| 12 | struct Derived : Type |
| 13 | { |
| 14 | Type::b_e; |
| 15 | enum { d_e = b_e }; |
| 16 | }; |
| 17 | |
| 18 | int v = (int)Derived< Base< 3 > >::d_e; |