1// { dg-do assemble } 2 3// Copyright (C) 2000 Free Software Foundation, Inc. 4// Contributed by Nathan Sidwell 18 Jan 2001 <nathan@codesourcery.com> 5 6// Bug 1694. We complained during deduction, rather than reject the deduction. 7 8template <class T, T d> class X {}; 9 10template <class T> X<T,0> Foo (T *); 11template <class T> int Foo (T const *); 12 13void Baz (int *p1, int const *p2) 14{ 15 int i = Foo (p1); // { dg-error "" } cannot convert 16 int j = Foo (p2); 17} 18void Baz (float *p1, float const *p2) 19{ 20 int i = Foo (p1); // ok, deduction fails on X<T,0> Foo (T *) 21 int j = Foo (p2); 22} 23