summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb70.C
blob: b17dc10dc0b4300e293d75bf93939af056c603f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do assemble  }
// conversion ops should be treated as coming from the most derived class
// for overload resolution.  See [over.match.funcs].

class X {
public:
  operator bool() const;
};

class Y : public X {
private:
  operator void*() const;
};

int f(Y const& y) {
  return bool(y);
}