|
From: | Thomas Maeder |
Subject: | Re: Template member function specialization |
Date: | Fri, 25 Feb 2005 18:35:34 +0100 |
User-agent: | Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"martines" <martiness1@REMOVEpoczta.onet.pl> writes: > struct Simple { > template <class T> > void fun() {} > template <> // *) > void fun<int>() {} // **) > }; > > Can anybody explain what is wrong with the first code and what is the The explicit specialization has to be defined in the enclosing namespace: struct Simple { template <class T> void fun() {} }; template <> void Simple::fun<int>() {}
[Prev in Thread] | Current Thread | [Next in Thread] |