view gcc/testsuite/g++.dg/cpp0x/using-enum-3.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

// PR c++/89511
// { dg-do compile { target c++11 } }

void f ()
{
  enum e { a };
  using e::a; // { dg-error "name enumerator" }
}

struct S {
  enum E { A };
  using E::A; // { dg-error "type .S. is not a base type for type .S." }
};

namespace N {
  enum E { B };
}

struct T {
  using N::E::B; // { dg-error "using-declaration for non-member at class scope" }
};