------- Comment #1 from jwakely dot gcc at gmail dot com 2009-07-23 14:06 ------- The code is invalid. This is allowed:
template <> template <class T> class Outer<int>::Inner<T> {}; but not the other way around. The diagnostic is correct to say "enclosing class templates are not explicitly specialized" See the last specialisation in the example following 14.7.3 [temp.expl.spec] paragraph 18 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40828