class template variations

I wish to accomplish anything similar to the follow, however without errors.

1
2
3
4
5
6
7
template < typename T >
class Name
{};

template < Name< typename U > T >
class Name
{};

What is Name< typename U > T supposed to mean?
Last edited on
A regular typed parameter, Name<U> called T.
Template parameters can only be types or integers
Very well.
Is there any way I can select a certain template variation dependant on the template type?
If not by type than some other trigger?
You mean template specialization?
You can do that like this:
1
2
3
template < typename T >
class Name < Name<T> >
{};

Topic archived. No new replies allowed.