blob: ccf750199aa436dfb9c26d1ba432446a7f05a616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Build don't link:
// Special Options: -Wconversion
struct A { };
struct B: public A {
A a;
operator A () { return a; } // WARNING - never used implicitly
};
void f (const A&);
void g()
{
B b;
(A) b; // gets bogus error - trying both constructor and type conversion operator
}
|