I learned that in C++,
typedef foo* mytype; (mytype) a // C-style cast
and
mytype(a) // function-style cast
The compiler knows. And it calls the constructor when there is one in both cases.