From ff52061e5238836ecfb00ebcf5fa053df22e5468 Mon Sep 17 00:00:00 2001 From: Dale Marchand Date: Tue, 17 Jun 2014 17:41:39 -0700 Subject: Fixed compilation error on RHEL 5.10. Nesting the namespace "Internal" inside of other namespaces and using sequential "using namespace" directives *or* relying on a "using namespace" directive to resolve a method name that contained the "Internal" namespace for resolution resulted in ambiguous resolution errors when compiling with the RHEL5.10 stock compiler (GCC 4.1.2). A sample error is provided below: Compilation error encountered was: reference to 'Internal' is ambiguous /usr/lib/gcc/x86_64-redhat- candidates are: namespace Internal { } qt-creator/src/libs/cplusplus/PPToken.h:106: error: namespace CPlusPlus::Internal { } Modifying the using namespace directives to reflect the nested nature of the namespace names resolved the compilation errors. For example: using namespace CppEditor; using namespace Internal; produced errors. However, using namespace CppEditor; using namespace CppEditor::Internal; resolved the compilation errors by removing the ambiguity. Change-Id: I6d5051e20acb2c147bd7ee1c6c6e1e3b2b4ff0f9 Reviewed-by: Erik Verbruggen --- src/plugins/cppeditor/cppincludehierarchy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/cppeditor/cppincludehierarchy.cpp') diff --git a/src/plugins/cppeditor/cppincludehierarchy.cpp b/src/plugins/cppeditor/cppincludehierarchy.cpp index e32467d238..1af8f2595a 100644 --- a/src/plugins/cppeditor/cppincludehierarchy.cpp +++ b/src/plugins/cppeditor/cppincludehierarchy.cpp @@ -50,7 +50,7 @@ #include using namespace CppEditor; -using namespace Internal; +using namespace CppEditor::Internal; using namespace Utils; namespace CppEditor { -- cgit v1.2.1