vs10 will compile the following without errors, even when language extensions are disabled. namespace A { template <typename T> class X; } namespace B { template <> class A::X<int>; } clang correctly outputs error: class template specialization of 'X' must originally be declared in namespace 'A' The diagnostic should be suppressed when -fms-compatibility is in effect.
Patch (no tests): https://github.com/avakar/clang/commit/777e00420383fbeadedabf62635b02909925542a
(In reply to comment #1) > Patch (no tests): > https://github.com/avakar/clang/commit/777e00420383fbeadedabf62635b02909925542a sorry, wrong bug
Created attachment 13998 [details] patch for pr13738
Fixed in r232800.