blob: 7a0b73e9ba09e81bb74505eaf5a72484570cfbcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// [over.match.conv]: For direct-initialization, those explicit conversion
// functions that are not hidden within S and yield type T or a type that
// can be converted to type T with a qualification conversion (4.4) are
// also candidate functions.
// { dg-options -std=c++0x }
struct A { };
struct B: A { };
struct C {
explicit operator B*(); // { dg-message "explicit" }
explicit operator B&(); // { dg-message "explicit" }
};
C c;
A* ap (c); // { dg-error "" }
A& ar (c); // { dg-error "" }
|