1 // PR c++/89511
2 // { dg-do compile { target c++11 } }
3 
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)
8 
f()9 void f ()
10 {
11   enum e { a };
12   using e::a;  // { dg-error "redeclaration" }
13   // { dg-error "enum" "" { target { ! c++2a } } .-1 }
14 }
15 
16 enum E { A };
17 
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 }
22 };
23 
24 namespace N {
25   enum E { B };
26 }
27 
28 struct T {
29   using N::E::B; // { dg-error "enum" "" { target { ! c++2a } } }
30 };
31