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++ - Member template functions and specialization
Here is an example taken from the C++ standard (14.5.2 (2), see http://www.dfv.rwth-aachen.de/doc/c++std/template.html#temp.mem): template <class T> struct A { void f(int); template <class T2> void f(T2); }; template <> void A<int>::f(int) { } template <> template <> void A<int>::f<>(int) // Error: 'f' is not a class template { } int main() { A<char> ac; ac.f(1); ac.f('c'); ac.f<>(1); } bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net? Nov 24 2002
In article <arqv7o$eqp$2 digitaldaemon.com>, Christof Meerwald says...Here is an example taken from the C++ standard (14.5.2 (2), see http://www.dfv.rwth-aachen.de/doc/c++std/template.html#temp.mem): Nov 26 2002
You need to include the body of the template in any compilation unit that needs to instantiate the template. -Walter "Richard" <fractal clark.net> wrote in message news:as0ph3$t9t$1 digitaldaemon.com...In article <arqv7o$eqp$2 digitaldaemon.com>, Christof Meerwald says...Here is an example taken from the C++ standard (14.5.2 (2), see http://www.dfv.rwth-aachen.de/doc/c++std/template.html#temp.mem): Nov 26 2002
In article <as0qgn$ud7$1 digitaldaemon.com>, Walter says...You need to include the body of the template in any compilation unit that needs to instantiate the template. -Walter Nov 26 2002
"Richard" <fractal clark.net> wrote in message news:as0ulb$131g$1 digitaldaemon.com...In article <as0qgn$ud7$1 digitaldaemon.com>, Walter says...You need to include the body of the template in any compilation unit that needs to instantiate the template. -Walter Nov 26 2002
|