##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# C++ concepts: TriviallyCopyable

From cppreference.com
< cpp‎ | concept

### [edit] Requirements

- Every copy constructor is trivial or deleted
- Every move constructor is trivial or deleted
- Every copy assignment operator is trivial or deleted
- Every move assignment operator is trivial or deleted
- at least one copy constructor, move constructor, copy assignment operator, or move assignment operator is non-deleted
- Trivial non-deleted destructor

This implies that the class has no virtual functions or virtual base classes.

Scalar types and arrays of `TriviallyCopyable` objects are `TriviallyCopyable` as well, as well as the const-qualified (but not volatile-qualified) versions of such types.

### [edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR | Applied to | Behavior as published | Correct behavior
--- | --- | --- | ---
CWG 1734 | C++11 | C++03 POD with deleted non-trivial assignment was not trivial | deleted ctors/operators allowed

### [edit] See also

is_trivially_copyable (C++11) | checks if a type is trivially copyable (class template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/concept/TriviallyCopyable&oldid=91935"