Do you mean in actuality or in theory? In theory, any C++ compiler must accept the code, because a program that rejects it would not be a C++ compiler.
In actuality, there may exist lousy programs that are advertised as C++ compilers and reject that code, or generate incorrect code.
Does anyone have any insight on how some of the different compilers might treat this code?
I'm pretty sure the latest versions of the four main compilers (VC++, Clang, ICC, GCC) all behave correctly with regard to scope rules.