http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59673
Bug ID: 59673 Summary: wrong specialization used when a partial specialization of a member template is explicitly specialized Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard-gccbugzilla at metafoo dot co.uk GCC rejects this: template<typename A> struct X { template<typename B> struct Y; template<typename B> struct Y<B[1]> { int x; }; // #1 template<typename B> struct Y<B[2]> { int y; }; }; template<> template<typename B> struct X<int>::Y<B[1]> { int z; }; // #2 int a = X<int>::Y<int[1]>().z; ... because it uses #1, not #2, when instantiating X<int>::Y<int[1]>.