![]() |
Home | Libraries | People | FAQ | More |
template<class T>
struct is_trivially_copyable
: true_type-or-false_type { };
Inherits: If T is a (possibly cv-qualified) type that is trivially copyable then inherits from true_type, otherwise inherits from false_type.
Compiler Compatibility: This trait is implemented
as the conjunction of has_trivial_copy,
has_trivial_assign, and
has_trivial_destructor.
Header: #include
<boost/type_traits/is_trivially_copyable.hpp>
Examples:
is_trivially_copyable<int>inherits fromtrue_type.
is_trivially_copyable<const int>inherits fromfalse_type.
is_trivially_copyable<char*>::typeis the typetrue_type.
is_trivially_copyable<int(*)(long)>::valueis an integral constant expression that evaluates to true.
is_trivially_copyable<MyClass>::valueis an integral constant expression that evaluates to false.
is_trivially_copyable<T>::value_typeis the typebool.