Template class that refers to itself as a template template parameter?

Posted by uj2 on Stack Overflow See other posts from Stack Overflow or by uj2
Published on 2010-06-16T10:25:11Z Indexed on 2010/06/16 10:42 UTC
Read the original article Hit count: 227

Filed under:
|
|

This code:

template <template <typename> class T>
class A
{
};

template <typename T>
class B
{
    A<B> x;
};

doesn't compile, I suppose since A<B> is interpreted as A<B<T> > within B's scope.

So, how do you pass B as a template template parameter within it's scope?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates