In addition to std::is_trivial and std::is_trivially_copyable , C ++ 11 provides several types of attributes to check if types have trivial constructors, destructors, and copy / move assignment operators, i.e.
std::is_trivially_constructiblestd::is_trivially_default_constructiblestd::is_trivially_copy_constructiblestd::is_trivially_move_constructiblestd::is_trivially_assignablestd::is_trivially_copy_assignablestd::is_trivially_move_assignablestd::is_trivially_destructible
What is their original purpose? Of course, some documents (documents) of the C ++ committee should explain the rationale for their inclusion in the standard C ++ library.
jotik source share