OSDN Git Service

* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / spec35.C
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>
5
6 // Bug 1617. We didn't resolve partial ordering properly. The std is rather
7 // vague about it anyway, DR 214 talks about this.
8
9 extern "C" int puts (char const *);
10
11 template <typename T> int Foo (T);    // ERROR - candidate
12 template <typename T> int Foo (T &);  // ERROR - candidate
13
14 template <typename T> int Qux (T);    // ERROR - candidate
15 template <typename T> int Qux (T const &);  // ERROR - candidate
16
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
20
21 template <typename T> int Baz (T *const &);       // ERROR - candidate
22 template <typename T> int Baz (T *);              // ERROR - candidate
23
24 int Baz (int const *ptr, int *ptr2)
25 {
26   Baz (ptr2);   // ERROR - ambiguous
27   Bar (ptr2);   // ERROR - ambiguous
28   Foo (ptr2);   // ERROR - ambiguous
29   Qux (ptr2);   // ERROR - ambiguous
30   return 0;
31 }