namespace lib1 { namespace part { typedef int result; } }
namespace lib2 { namespace part = lib1::part; } using namespace lib1; using namespace lib2; int main() { part::result val = 0; return val; } The above code results in a compilation error, "error: `part' has not been declared", but should it really? I can't say the parts of the C++ standard I've read has been clear on the point, but it seems reasonable that the compiler should recognize that "part" is not ambiguous in this case. -- Summary: unnecessary namespace-alias ambiguity Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: emilp at mac dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26448