The defintion of "literal type" is in [basic.types] (C++11 3.9):
A type is a literal type if it is:
- void; or
- a scalar type; or
- a reference type; or
- an array of literal type; or
- a class type (Clause 9) that has all of the following properties:
- it has a trivial destructor,
- it is an aggregate type (8.5.1) or has at least one
constexpr
constructor or constructor template that is not a copy or move constructor, and- all of its non-static data members and base classes are of non-volatile literal types.
Literal types are broadly speaking the types that are permitted to occur as and in constant expressions.
There is a trait, std::is_literal_type
, for checking if a type is a literal type.