19980824 member template specialization bugs?
Alexandre Oliva
oliva@dcc.unicamp.br
Wed Sep 2 18:33:00 GMT 1998
Reid M Pinchback <reidmp@MIT.EDU> writes:
> template <class X> struct bug { template <class Y> void f(Y y) {} };
> template <class X> template <> void bug<X>::f<>(X x) {}
> main(int argc, char * argv[]) { bug<int> b; b.f(1); }
> This results in "Internal compiler error 40". Same thing happens if
> "f<>(X x)" is replaced by "f<X>(X x)" or "f<X>(char x)", but the ICE
> goes away when "f<>(X x)" is replaced by "f<int>(X x)".
Interesting... It shouldn't compile in any of these cases...
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list