Re: [Dev-C++] templates in C++ : precisions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: erwan a. <erw...@fr...> - 2003-01-12 13:49:45
|
This is only a function declaration, not a call. Anyway, somebody on the
gcc-help mailing list gave me a solution that seems to work: replace
"template <class T>" by "template <typename T>". But I don't know why ...
----- Original Message -----
From: "Ioannis Vranos" <no...@ho...>
To: <dev...@li...>
Sent: Sunday, January 12, 2003 12:38 PM
Subject: Re: [Dev-C++] templates in C++ : precisions
-------Original Message-------
From: erwan ancel
Date: =CA=F5=F1=E9=E1=EA=DE, 12 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 12:28=
:13 =EC=EC
To: dev...@li...
Subject: [Dev-C++] templates in C++ : precisions
well, this is my problem:
I would like to make a template class that owns a set of elements that ha=
ve
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?
=3D=3D> If you remove that B() call, the code should compile.
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL: http://run.to/noicys
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =3Domething 2 See!
http://www.vasoftware.com
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|