https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78065
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- This shows that the alias declaration declares some_struct in the enclosing namespace: template<typename T> struct foo { using sub = struct some_struct; }; some_struct s; All of EDG, GCC and Clang say that some_struct is incomplete at that point, which means they all (correctly, I believe) add it to the enclosing namespace. So MSVC is wrong to treat foo<int>::sub and foo<double>::sub as distinct types, they both refer to ::some_struct EDG seems to also add bar<T>::some_struct to the enclosing namespace, which I think is wrong.