Hi
I got a headache on this problem, maybe someone can help me here
I want to create a class which can be handled like this
manager<int, list> // possible variant
manager<int, vector> // another possible variant
manager<float, vector> // and so on
I cannot just create / pass a vector<int>. I need the first information
(e.g. int) inside the manager class, because I wrap this type inside
another template (see below)
The problem is - how do I define such a template? My first Idea was
"leave it to the compiler"
template <class tContent, class tContainer> class manager {
void add(anotherBase<tContent>);
protected:
tContainer<anotherBase<tContent> > m_container;
};
which does not work, because "tContainer is not a template".
So my question - is this possible at all? I did not find anything on
that topic in "The C++ Programming Language", and that's a IMHO a bad
sign ...
Maybe someone knows another way of doing such a thing (derivation would
be possible, but ugly in this case).
Arne