Compiler Error C2616

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2616.

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

A reference cannot be initialized from a non-lvalue.

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

Show: