This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C++ templates: precisions
- From: "erwan ancel" <erwan dot ancel at free dot fr>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Sun, 12 Jan 2003 11:25:15 +0100
- Subject: C++ templates: precisions
- References: <005c01c2ba19$cc6699a0$4fbd0b50@brisedorient>
well, this is my problem:
I would like to make a template class that owns a set of elements that have
the type of one of the class parameters. And it doesn't compile...
example:
#include <set>
template <class T>
class A
{
public:
A();
B();
std::set<T> _list;
};
the compiler's output tells that the type T is not defined... Well, of
course, but it will be defined when the template will be instanciated. So it
should be possible...
Does anybody know a solution to my problem?