cv_qualifier ¶The four CV-qualifiers—const, volatile, restrict,
and _Atomic—are represented by the cv_qualifier type.
This type is an enum which represents a set of zero or more of the qualifiers named above, and which may be operated on with the “usual” bit operations (bit-or represents union, bit-and intersection, etc.).
The following named constants are provided by the cv_qualifier
type:
TYPE_UNQUALIFIED ¶Represents no qualification, i.e. the empty set of CV-qualifiers. This
value is zero, i.e. !TYPE_UNQUALIFIED holds.
TYPE_QUAL_CONST ¶Represents the const qualifier and, thus, the singleton set of
just that qualifier.
TYPE_QUAL_VOLATILE ¶Represents the volatile qualifier and, thus, the singleton set of
just that qualifier.
TYPE_QUAL_RESTRICT ¶Represents the restrict qualifier and, thus, the singleton set of
just that qualifier.
TYPE_QUAL_ATOMIC ¶Represents the _Atomic qualifier and, thus, the singleton set of
just that qualifier.
TYPE_QUAL_ALL ¶Represents the set of all CV-qualifiers, and thus represents the
set containing the const, volatile, restrict, and
_Atomic qualifiers (i.e. the universe).
cv_qualifier also provides convenience operator overloads for the
bit-OR, bit-AND, bit-XOR and bit-NOT operators (and the assignment
variants thereof) which inhibit integer promotion.
A cv_qualifier may implicitly be converted into the
qualifier_set type described below, as such a conversion is
always safe (no information is lost; only a generic address space
qualifier is gained).