OSDN Git Service

new
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / overload7.C
1 // Check that object call works when there are multiple conversion ops
2 // returning the same type.
3
4 typedef int (*pfn)();
5
6 int zero () { return 0; }
7 int one  () { return 1; }
8 int two  () { return 2; }
9
10 struct A {
11   A() { }
12   operator pfn () { return one; }
13   operator pfn () const { return zero; }
14   operator pfn () volatile { return two; }
15 };
16
17 int
18 main ()
19 {
20   const A a;
21   return a();
22 }