2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / spec35.C
blobf39dd79ec30b49a0caf9bd8a8334a5ec2405f9b3
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 18 Jan 2001 <nathan@codesourcery.com>
6 // Bug 1617. We didn't resolve partial ordering properly. The std is rather
7 // vague about it anyway, DR 214 talks about this.
9 extern "C" int puts (char const *);
11 template <typename T> int Foo (T);    // { dg-error "" } candidate
12 template <typename T> int Foo (T &);  // { dg-error "" } candidate
14 template <typename T> int Qux (T);    // { dg-error "" } candidate
15 template <typename T> int Qux (T const &);  // { dg-error "" } candidate
17 template <typename T> int Bar (T const *const &); // { dg-error "" } candidate
18 template <typename T> int Bar (T *const &);       // { dg-error "" } candidate
19 template <typename T> int Bar (T *);              // { dg-error "" } candidate
21 template <typename T> int Baz (T *const &);       // { dg-error "" } candidate
22 template <typename T> int Baz (T *);              // { dg-error "" } candidate
24 int Baz (int const *ptr, int *ptr2)
26   Baz (ptr2);   // { dg-error "" } ambiguous
27   Bar (ptr2);   // { dg-error "" } ambiguous
28   Foo (ptr2);   // { dg-error "" } ambiguous
29   Qux (ptr2);   // { dg-error "" } ambiguous
30   return 0;