http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59044
--- Comment #2 from Tom De Caluwé <decaluwe.t at gmail dot com> --- As far as I can verify partial specializations are only allowed at namespace scope so you're right. However gcc never used to complain about such constructs. In any case, an internal compiler error is never desired behaviour, hence the bug report.