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 C2609

'conversion' : cannot implicitly convert a non-lvalue 'type1' function return to a 'type2' that is not const

A reference cannot be initialized from a function return value that is not an l-value.

This is an error under ANSI compatibility (/Za) and a warning under Microsoft extensions (/Ze).

Example

struct X 
{
    X( int );
};
X f();
X& r = f();   // error