This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
static template specialization
- From: Levente Farkas <lfarkas at mindmaker dot hu>
- To: GCC-Bugs <gcc-bugs at gcc dot gnu dot org>
- Date: Mon, 19 Nov 2001 09:44:39 +0100
- Subject: static template specialization
- Organization: Mindmaker Ltd.
- Reply-to: lfarkas at mindmaker dot hu
[Get raw message]
hi,
Is this code incorrect or it's just a gcc bug?
------------
class A
{
template<typename T>
static int get(T) { return 0; }
template<>
static int get(int) { return 1; }
template<>
static int get(double) { return 2; }
};
int main()
{
A a;
return 0;
}
------------
thanks your help.
-- Levente "Si vis pacem para bellum!"