An lvalue (3.10) of a non-function, non-array type T can be converted to an rvalue. [...]
If T is a non-class type, the type of the rvalue is the cv-unqualified version of T.
Otherwise, the type of the rvalue is T.
Each type which is a cv-unqualified complete or incomplete object type or is void (3.9) has three corresponding cv-qualified versions of its type:
Reference:
Understanding lvalues and rvalues in C and C++
If T is a non-class type, the type of the rvalue is the cv-unqualified version of T.
Otherwise, the type of the rvalue is T.
Each type which is a cv-unqualified complete or incomplete object type or is void (3.9) has three corresponding cv-qualified versions of its type:
- a const-qualified version,
- a volatile-qualified version,
- and a const-volatile-qualified version. [...]
The cv-qualified or cv-unqualified versions of a type are distinct types; however, they shall have the same representation and alignment requirements (3.9)
Reference:
Understanding lvalues and rvalues in C and C++
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.