If I read the standard correctly, template<> should not be used in this case.
Basically, you need to provide several lists of template options for nested templates:
(see [temp.mem] ยง1)
A template can be declared in a class or class template; such a template is called a member template. Member template can be defined inside or outside the class definition or class template definition. A member template of a class template, which is defined outside the definition of its class, must be specified using the template parameters of the class template , followed by the template parameters of the member template.
... but you should not provide an additional list of template parameters to specialize the template with the template parameter:
(see [temp.class.spec] ยง2)
Each individual template template specialization is a separate template ...
(and then ยง4)
The parameters of the template are indicated in the attached list of angle brackets, which immediately follows the keyword template. For partial specialization, the list of template arguments is explicitly written immediately after the class template name. For primary templates, this list is implicitly described by the list of template parameters ...
There is nothing to offer an additional list of template parameters - specialization is just a template, and as such it requires only one parameter list.
source share