FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / spec35.C
blobe768c9104b3ad53bf3108a332d09f9e91d73b264
1 // Build don't link:
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);    // ERROR - candidate
12 template <typename T> int Foo (T &);  // ERROR - candidate
14 template <typename T> int Qux (T);    // ERROR - candidate
15 template <typename T> int Qux (T const &);  // ERROR - candidate
17 template <typename T> int Bar (T const *const &); // ERROR - candidate
18 template <typename T> int Bar (T *const &);       // ERROR - candidate
19 template <typename T> int Bar (T *);              // ERROR - candidate
21 template <typename T> int Baz (T *const &);       // ERROR - candidate
22 template <typename T> int Baz (T *);              // ERROR - candidate
24 int Baz (int const *ptr, int *ptr2)
26   Baz (ptr2);   // ERROR - ambiguous
27   Bar (ptr2);   // ERROR - ambiguous
28   Foo (ptr2);   // ERROR - ambiguous
29   Qux (ptr2);   // ERROR - ambiguous
30   return 0;