Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / using-enum-3.C
blob4638181c63cebdc8be98f631ab8a8ce06556c7d5
1 // PR c++/89511
2 // { dg-do compile { target c++11 } }
4 // [namespace.udecl] In a using-declaration used as a
5 // member-declaration, the nested-name-specifier shall name a base
6 // class of the class being defined
7 // (this changes in C++2a)
9 void f ()
11   enum e { a };
12   using e::a;  // { dg-bogus "redeclaration" "P1787" }
13   // { dg-error "enum" "" { target { ! c++2a } } .-1 }
16 enum E { A };
18 struct S {
19   enum E { A };
20   using E::A; // { dg-error "not a base" "" { target { ! c++2a } } }
21   // { dg-error "conflicts" "" { target c++2a } .-1 }
24 namespace N {
25   enum E { B };
28 struct T {
29   using N::E::B; // { dg-error "enum" "" { target { ! c++2a } } }