no legal conversion of return value to return type 'type'
The return value cannot be converted to the required type. If encounter this error on code that compiled correctly with an earlier version of Visual C++, see Technote: Improved Conformance to ANSI C++.
Possible solution
The following sample generates C2553:
struct X { private: X(const X&) { } }; struct Y : X { }; Y retY(Y y) { // C2553 // try ... // Y* retY(Y *y) { return y; } void main() { }