2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / deduct3.C
blobb54c5a15332e0a9382e13fc22e19fd50e0450fe7
1 // { dg-do assemble  }
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 18 Jan 2001 <nathan@codesourcery.com>
6 // Bug 1694. We complained during deduction, rather than reject the deduction.
8 template <class T, T d> class X {};
10 template <class T> X<T,0> Foo (T *);
11 template <class T> int Foo (T const *);
13 void Baz (int *p1, int const *p2)
15   int i = Foo (p1); // { dg-error "" } cannot convert
16   int j = Foo (p2);
18 void Baz (float *p1, float const *p2)
20   int i = Foo (p1); // ok, deduction fails on X<T,0> Foo (T *)
21   int j = Foo (p2);