Share via

Notation in Expressions

The C++ language specifies certain compatibilities when specifying operands. The following table shows the types of operands acceptable to operators that require operands of type type.

Operand Types Acceptable to Operators

Type expected

Types allowed


const type

volatile type


const type&

volatile type&

volatile const type

volatile const type&


type* consttype* volatiletype* volatile const

const type

typeconst typeconst type&

volatile type

typevolatile typevolatile type&

Because the preceding rules can always be used in combination, a const pointer to a volatile object can be supplied where a pointer is expected.

See Also


Semantics of Expressions