I am trying to do something like the following:
template <typename T> struct A { template <typename U> struct AA { }; }; template <typename V, template <typename> class W = A<V>::AA>
But the Visual Studio 2010 compiler spits out:
error C3202: 'AA': invalid default argument for template parameter '', expected class template
If I replaced B with the following pattern:
// Replace "T" with "int" template <typename V, template <typename> class W = A<int>::AA> struct B { };
The code compiles fine, but that is not what I want. If the original is not legal C ++, is there an alternative that provides a similar interface for users of template "B"?
c ++ templates template-templates
Aaron
source share