Objects, references, functions including function template specializations, and expressions have a property called type, which both restricts the operations that are permitted for those entities and provides semantic meaning to the otherwise generic sequences of bits.
[edit] Type classification
The C++ type system consists of the following types:
-
-
-
- the type bool;
- character types:
-
- ordinary character types: char, signed char, unsigned char[1]
- wide character types: char16_t, char32_t, (since C++11)wchar_t;
- standard signed integer types: signed char, short, int, long, long long;
- extended signed integer types (implementation-defined);
|
(since C++11) |
-
- standard unsigned integer types: unsigned char, unsigned short, unsigned, unsigned long, unsigned long long;
- extended unsigned integer types (each corresponds to an extended signed integer type, and vice versa);
|
(since C++11) |
-
-
-
-
- lvalue reference to object types;
- lvalue reference to function types;
-
- rvalue reference to object types;
- rvalue reference to function types;
|
(since C++11) |
-
-