Type specifiers

Type specifiers indicate the type of the object being declared. The following are the available kinds of type specifiers:

""A 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.
  • ""It 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 In the C++11 standard, the following type specifiers are introduced:
  • The auto type specifer
  • The decltype(expression) type specifier
Related information