summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload17.C
blob: df47ed44ef8cc8c1c08847e95a23dd29e34810ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// Bug: g++ fails to prefer UDC's alone to UDC's plus standard conversions.

struct B { };
struct D: public B { };
struct DP {
  operator D * () const;
  operator double () const;
};

void f (B *);
void f (D *);
void g (double);
void g (float);

void h (DP p)
{
  f (p);
  g (p);
}