Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/named req/TriviallyCopyable"

From cppreference.com
< cpp‎ | named req
m (Shorten template names. Use {{lc}} where appropriate.)
m (Update links.)
Line 15: Line 15:
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/types/dcl list is_trivially_copyable}}
+
{{dsc inc | cpp/types/dsc is_trivially_copyable}}
 
{{dsc end}}
 
{{dsc end}}
  

Revision as of 21:50, 31 May 2013

Template:cpp/concept/title Template:cpp/concept/navbar

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]