How can I enable explicit casting from, lets say int, to a user defined class Foo?
I made a conversion constructor from int to Foo, but is that it? I could overload a cast operator from Foo to int, but that is not what I'm looking for.
Is there a way to enable this piece of code?
int i = 5;
Foo foo = (Foo)i;