2 // Origin: Jo Totland <jototland@hotmail.com>
5 // Partial specialization involving expression of non-type template
6 // parameter causes ICE.
8 extern "C" void abort();
10 template <int N> struct HoldInt
14 template <class A, class B> struct Add
18 template <int N> struct Add<HoldInt<N>, HoldInt<-N> >
24 template <int N, int M>
25 struct Add<HoldInt<N>, HoldInt<M> >
27 typedef HoldInt<N+M> type;
32 Add<HoldInt<1>, HoldInt<-1> > a;
33 Add<HoldInt<1>, HoldInt<-2> > b;
34 if (a.f() != 0 || b.f() != 1)