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 C2608

illegal reference cast - operand not an l-value

The reference cannot be cast because a temporary copy of the referenced value cannot be generated.

Example

struct C
{
   int mem;
   operator int();
};
struct D
{
   operator C();
   void memfunc();
};
D aD[10];
void D::memfunc()
{
   C aC = ( C& )( aD + 1 );   // error
}