OSDN Git Service

update
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb70.C
1 // conversion ops should be treated as coming from the most derived class
2 // for overload resolution.  See [over.match.funcs].
3 // Build don't link:
4 // excess errors test - XFAIL *-*-*
5
6 class X {
7 public:
8   inline operator bool() const { return true; }
9 };
10
11 class Y : public X {
12 private:
13   inline operator void*() const { return 0; }
14 };
15
16
17 int f(Y const& y) {
18   return bool(y);
19 }