As from subject. I saw this terminology in a question I recently asked, and apparently it's a well established term, but I am not able to find anything on stackoverflow.
There are fundamental types and compound types. Fundamental types are the arithmetic types, void
, and std::nullptr_t
. Compound types are arrays, functions, pointers, references, classes, unions, enumerations, and pointers to non-static members.
A cv-unqualified type is any of those types.
For any cv-unqualified type, there are three corresponding cv-qualified types:
const
cv-qualifier volatile
cv-qualifier const
and volatile
cv-qualifiersNote, however, that cv-qualifiers applied to an array type actually apply to its elements.
The cv-qualified and cv-unqualified types are distinct. That is int
is a distinct type from const int
.
A type is "cv-unqualified" if it doesn't have any cv-qualifiers. A cv-qualifer is either const
or volatile
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With