In such a situation
namespace n {
void f() {
void another_function();
}
}
Should the function another_function
be defined inside the namespace n
or outside? VS 2012 (with the November CTP) says it should be outside, and GCC 4.7.2 on the Mac says it should be inside. If I do the wrong one, I get undefined symbol errors from the linkers.
I generally trust GCC to be more compliant to the standard, but this is C++ and you can never be sure.