Built-in (fundamental) C++ data types:
- integral
bool(true,false)char,wchar_tint,long,long long
- floating point
floatdoublelong double
void
User-defined types:
- enumerations
- classes
Also consult:
<cstdint><numeric_limits><cstddef>
String literals:
- statically allocated so it's safe to return them from functions
New with C++11:
alignasalignofstd::alignment_of
Deducing a type:
autofor deducing a type of an object from its initializer; the type can be the type of a variable, aconst, or aconstexpr.decltype(expr)for deducing the type of something that is not a simple initializer, such as the return type for a function or the type of a class member.
General stuff:
- The result of
sizeofis of an unsigned integral type calledsize_tdefined in<cstddef>. The result of pointer subtraction is of a signed integral type calledptrdiff_tdefined in<cstddef>.