Namespaces
Variants
Views
Actions

C++ concepts: TriviallyCopyable

From cppreference.com
< cpp‎ | concept
Revision as of 21:50, 31 May 2013 by P12bot (Talk | contribs)

 
 
 

Requirements

  • Trivial copy constructor
  • Trivial move constructor
  • Trivial copy assignment operator
  • Trivial move assignment operator
  • Trivial destructor
  • No virtual functions or virtual base classes
  • All (non-static) members and base classes are TriviallyCopyable

Notes

  1. Other than the other requirements, trivial constructor, assignment and destructor must be defined implicitly (not user-provided)
  2. Scalar types and arrays of TriviallyCopiable objects are TriviallyCopiable as well

See also

checks if a type is trivially copyable
(class template) [edit]