C
cv_curious
I have a generic container type:
template< class T > Container {};
Now I want to create a generic item class that will be 'contained'
inside the generic container. The class will change behavior according
to the container it is contained in.
template< class T > Item{};
Question: How do I tell the compiler I want an instance of container
of items? It seems there is an infinite recursion involved here.
Ideas???
template< class T > Container {};
Now I want to create a generic item class that will be 'contained'
inside the generic container. The class will change behavior according
to the container it is contained in.
template< class T > Item{};
Question: How do I tell the compiler I want an instance of container
of items? It seems there is an infinite recursion involved here.
Ideas???