Consider the following program. Is it well-formed or not according to the c++ standard (references to relevant parts of the standard needed):
namespace X { extern int i; }
namespace N { using X::i; }
int N::i = 1;
int main() {}
I'm getting different results for different compilers. I'm trying to figure out for what compiler I should file a bug report for:
Clang: Gives the following compiler error: No member named 'i' in namespace 'N'
GCC and Visual C++ compiles it without errors.
For comparison the following gives compiler error with all three compilers:
namespace X { void f(); }
namespace N { using X::f; }
void N::f() {};
int main() {}