This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: static template specialization
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Nov 2001 12:05:52 +0100
- Subject: Re: static template specialization
[Get raw message]
Hi,
I'm not a language lawyer, but another compiler, known to be very close
to the standard, also finds many errors...
Cheers,
Paolo.
"18371.c", line 5: error: explicit specialization is not allowed in the
current scope
template<>
^
"18371.c", line 6: error: a storage class may not be specified here
static int get(int) { return 1; }
^
"18371.c", line 7: error: explicit specialization is not allowed in the
current scope
template<>
^
"18371.c", line 8: error: a storage class may not be specified here
static int get(double) { return 2; }
^
"18371.c", line 13: warning: variable "a" was declared but never
referenced
A a;
^