This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

using-directives


Sorry for posting all this C++ stuff to the egcs list, I get more
feedback here than I do on comp.std.c++ (thanks, Alexandre!).

So what's the relation between using directives and shadowing? I.e. is

namespace A{
  void X();
  struct X{};
}

using A::X;
struct X x;

correct C++? [namespace.qual]/2 seems to indicate that it is.
Also, what about

namespace A{
  void X();
}

namespace B{
  using A::X;
  struct X{};
}

using B::X;

Is this illegal because of [namespace.qual]/5?

TIA,
Martin



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]