Lvalue-to-rvalue conversions

If an lvalue appears in a situation in which the compiler expects an rvalue, the compiler converts the lvalue to an rvalue. The following table lists exceptions to this:
Situation before conversion Resulting behavior
The lvalue is a function type.  
The lvalue is an array.  
The type of the lvalue is an incomplete type. compile-time error
The lvalue refers to an uninitialized object. undefined behavior
The lvalue refers to an object not of the type of the rvalue, nor of a type derived from the type of the rvalue. undefined behavior
C++ The lvalue is a nonclass type, qualified by either const or volatile. The type after conversion is not qualified by either const or volatile.
Related information