operator
// suppose class A's code is not accessible A::A(const int i) { /* ... */ } // This does not prevent you to make a B to A convertor struct B { int b; B(const int i): b(i) {} operator A() { return A(b); } };