The following code fails to compile: namespace Foo { struct Bar { struct FooBar {}; }; }
using ::Foo::Bar::FooBar; // line 7 The error message being: using.cpp:7: error: `Foo::Bar' is not a namespace In the ISO C++ grammar [7.3.3], the using-declaration references a "nested-name-specifier unqualified-id", not stating any restrictions on the nested-name-specifier, which is composed of a sequence of class-or-namespace-name [5.1]. -- Summary: failure "using" a name contained in a class Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fp at mc dot com GCC build triplet: mingw-special GCC host triplet: mingw-special GCC target triplet: mingw-special http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25006