#include <string> namespace N { struct X { static std::string s(); }; } namespace N { inline std::string ::N::X::s() { return ""; } } int main() {} compiled with version 3.4.3 or 4.0.2 yields GCC_Fehler_25022006.cpp:6: error: ‘struct std::string::N’ has not been declared GCC_Fehler_25022006.cpp:6: error: ISO C++ forbids declaration of ‘s’ with no type GCC_Fehler_25022006.cpp: In function ‘int N::s()’: GCC_Fehler_25022006.cpp:6: error: invalid conversion from ‘const char*’ to ‘int’ But I believe the above code is correct. Changing ::N::X::s() to N::X::s() makes the code compile.
*** This bug has been marked as a duplicate of 26468 ***