[Bug c++/116160] Rejects repeated using-declaration `using A::x;` [namespace.udecl]

arthur.j.odwyer at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Jul 31 19:03:12 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116160

--- Comment #2 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
> I am not sure this [the first case] is valid code though.

The Standard contains an example of exactly this situation:
https://eel.is/c++draft/namespace.udecl#example-8

  using A::x; // OK, hides struct B​::​x
  using A::x; // OK, does not conflict with previous using A​::​x


More information about the Gcc-bugs mailing list