The following code:
template struct A1 { template struct A2 { /* ... */ }; template <> struct A2<-1>
It is not allowed to explicitly specialize A2 without specializing A1 (§14.7.3/18). C++0x has the same restriction (n3242 §14.7.3/16). At the same moment a partial specialization of a nested class is allowed. So the trick with a dummy class is Ok.
A2
A1