Type specifiers

Type specifiers indicate the type of the object being declared. See the following available kinds of types:
  • Fundamental or built-in types:
    • Arithmetic types
      • Integral types
      • Boolean types
      • Floating-point types
      • Character types
    • The void type
    • IBM extension Vector types
  • User-defined types
C++ onlyA type is a literal type if it satisfies one of the following conditions:
  • It is a scalar type.
  • It is a reference type.
  • It is an array of literal type.
  • C++11It is a class type with all the following properties:
    • The class has a trivial destructor.
    • Each constructor call and full expression in the initializers for nonstatic data members (if any) is a constant expression.
    • The class is an aggregate type or has at least one constexpr constructor or constructor template that is not a copy or move constructor.
    • All nonstatic data members and base classes of the class are of literal types.C++11
C++ only
C++11 In the C++11 standard, the following type specifiers are introduced:
  • The auto type specifier
  • The decltype(expression) type specifier
  • C++11