1

Say I have two template classes

template < class T >
class Foo
{
    /**/
};

and

template < class T >
class Bar
{
     /**/
};

how can I specialise Foo with Bar<T> ?? what is the syntax?? is it

template<>
template<class T>
class Foo<Bar<T>>
{ /**/ };

or

template<class T>
class Foo<Bar<T>>
{ /**/ };

or any other syntax??

WARhead
  • 643
  • 5
  • 17

1 Answers1

4

The syntax is the last one:

template<class T>
class Foo<Bar<T>>
{
     /* Your implementation of this partial specialization. */
};
Jarod42
  • 203,559
  • 14
  • 181
  • 302