I wrote this.
class A { };
class B : public A
{
public:
static B Convert(const A &a) { return static_cast<const B&>(a); }
};
int main()
{
A a;
B b = B::Convert(a);
}
But I would like to have this, do you know how?
B b = a.Convert();
Thank you in advance for your answers! ^^