|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - template instantiation
In the following test-case, the template function isn't instantiated (linker
complains with "Symbol Undefined ?f YAHH Z (int cdecl f(int ))"):
template<class T> int f(T a);
int main(int argc, char *argv[])
{
int a = 0;
return f(a);
}
template<class T> int f(T a)
{
return 0;
}
and DM doesn't support explicit template instantiation, e.g.
template<class T>
struct A
{
void f()
{ }
};
template A<int>;
bye, Christof
--
http://cmeerw.cjb.net Jabber: cmeerw jabber.at
mailto cmeerw at web.de ICQ: 93773535, Yahoo!: cmeerw
...and what have you contributed to the Net?
Oct 15 2001
Christof Meerwald wrote: Oct 16 2001
Yes, -XD will make it work with the existing compiler, but I wanted to fix it so it worked automatically. -Walter John Fletcher wrote in message <3BCBF5E9.83FE7752 aston.ac.uk>...Christof Meerwald wrote:In the following test-case, the template function isn't instantiated Oct 16 2001
On Tue, 16 Oct 2001 11:42:43 -0700, Walter wrote:Yes, -XD will make it work with the existing compiler, but I wanted to fix it so it worked automatically. -Walter Oct 16 2001
The XI is a holdover from the bad old days before comdat's. Do you need it? "Christof Meerwald" <cmeerw web.de> wrote in message news:9qi0v7$2gvh$1 digitaldaemon.com...On Tue, 16 Oct 2001 11:42:43 -0700, Walter wrote:Yes, -XD will make it work with the existing compiler, but I wanted to Oct 16 2001
On Tue, 16 Oct 2001 15:12:08 -0700, Walter wrote:The XI is a holdover from the bad old days before comdat's. Do you need it? Oct 17 2001
|