c++/6620: partial template specialization on int

Reichelt reichelt@igpm.rwth-aachen.de
Mon May 13 03:05:00 GMT 2002


Hi,

on can reduce the testcase a little more:

--------------------------snip here-------------------------------
template <int N> struct HoldInt {};

template <class A, class B> struct Add;

template <int N, int M> struct Add< HoldInt<N>, HoldInt<M> > {};

template <int N>        struct Add< HoldInt<N>, HoldInt<-N> > {};

Add< HoldInt<1>, HoldInt<-1> > a;
--------------------------snip here-------------------------------

By the way, both testcases not only crash gcc but even SGI's native
compiler, so they seem to be a real compiler-killers ;-)

Greetings,
Volker Reichelt

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6620




More information about the Gcc-bugs mailing list