C++11 (n3485), [basic.types]9-10
Arithmetic types, enumeration types, pointer types, pointer to member types, std::nullptr_t
, and cv-qualified versions of these types are collectively called scalar types [...]
A type is a literal type if it is:
- a scalar type; or
- a reference type; or
- an array of literal type; or
- a class type that has all of the following properties:
- it has a trivial destructor,
- every constructor call and full-expression in the brace-or-equal-initializers for non-static data members (if any) is a constant expression,
- it is an aggregate type 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.
[dcl.init.aggr]/1
An aggregate is an array or a class with no user-provided constructors, no brace-or-equal-initializers for non-static data members, no private or protected non-static data members, no base classes, and no virtual functions.