summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/refinit1.C
blob: e120078e56c586de857c3b186e82192e3b658044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do assemble  }
// Test that we don't allow multiple user-defined conversions in reference
// initialization.

struct B { };

struct A {
  A (const B&);
};

struct C {
  operator B ();
};

C c;

const A& ref (c);		// { dg-error "" } requires two UDCs