Reputation: 15611
According to C++ Standard 2003:
An lvalue (3.10) of a non-function, non-array type T can be converted to an rvalue.
What does it mean that array and function cannot be converted to rvalue?
Upvotes: 3
Views: 166
Reputation: 129754
Both function and array types are covered by later clauses (4.2, 4.3).
An lvalue or rvalue of type “array of N T” or “array of unknown bound of T” can be converted to an rvalue of type “pointer to T.” The result is a pointer to the first element of the array.
(...)
An lvalue of function type T can be converted to an rvalue of type “pointer to T.” The result is a pointer to the function.
Upvotes: 6