NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2553

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() {
}