[expr.type] (original) (raw)

7 Expressions [expr]

7.2 Properties of expressions [expr.prop]

7.2.2 Type [expr.type]

If an expression initially has the type “reference toT” ([dcl.ref], [dcl.init.ref]), the type is adjusted toT prior to any further analysis.

The expression designates the object or function denoted by the reference, and the expression is an lvalue or an xvalue, depending on the expression.

[Note 1:

Before the lifetime of the reference has started or after it has ended, the behavior is undefined (see [basic.life]).

— _end note_]

If a prvalue initially has the type “cv T”, whereT is a cv-unqualified non-class, non-array type, the type of the expression is adjusted to T prior to any further analysis.

The composite pointer type of two operands p1 andp2 having types T1 and T2, respectively, where at least one is a pointer or pointer-to-member type orstd​::​nullptr_­t, is:

[Example 1: typedef void *p;typedef const int *q;typedef int **pi;typedef const int **pci;

The composite pointer type of p and q is “pointer to const void”; the composite pointer type of pi and pci is “pointer to const pointer toconst int”.

— _end example_]