This struct template implements a meta‐function to determine whether the (template parameter) t_TYPE is trivially copyable.

Synopsis

Declared in <bslmf_istriviallycopyable.h>

template<class t_TYPE>
struct is_trivially_copyable
    : BloombergLP::bslmf::IsTriviallyCopyable_Intrinsic<t_TYPE>::type

Description

This struct derives from bsl::true_type if the t_TYPE is trivially copyable, and from bsl::false_type otherwise. This meta‐function has the same syntax as the is_trivially_copyable meta‐function defined in the C++11 standard [meta.unary.prop]; however, this meta‐function can automatically determine the value for the following types only: reference types, fundamental types, enumerated types, pointers to members, and types declared to have the bsl::is_trivially_copyable trait using the BSLMF_NESTED_TRAIT_DECLARATION macro (the value for other types defaults to false). To support other trivially copyable types, this template must be specialized to inherit from bsl::true_type for them.

Base Classes

Name

Description

BloombergLP::bslmf::IsTriviallyCopyable_Intrinsic<t_TYPE>::type

Specializations

Name

Description

is_trivially_copyable<BloombergLP::bsls::TimeInterval>

This template specialization for is_trivially_copyable indicates that TimeInterval is a trivially copyable type.

is_trivially_copyable<owner_equal>

This template specialization for is_trivially_copyable indicates that owner_equal is a trivially copyable type.

is_trivially_copyable<owner_hash>

This template specialization for is_trivially_copyable indicates that owner_hash is a trivially copyable type.

is_trivially_copyable<type_index>

Indicate that type_index is a trivially copyable type.

is_trivially_copyable<hash<TYPE>>

This template specialization for is_trivially_copyable indicates that hash<TYPE> is a trivially copyable type.

is_trivially_copyable<owner_less<POINTER_TYPE>>

This template specialization for is_trivially_copyable indicates that owner_less<POINTER_TYPE> is a trivially copyable type.

is_trivially_copyable<t_TYPE volatile>

This partial specialization ensures that volatile‐qualified types have the same result as their element type.

is_trivially_copyable<t_TYPE const>

This partial specialization ensures that const‐qualified types have the same result as their element type.

is_trivially_copyable<t_TYPE const volatile>

This partial specialization ensures that const‐volatile‐qualified types have the same result as their element type.

is_trivially_copyable<t_TYPE&>

This partial specialization optimizes away a number of nested template instantiations to prove that reference types are never trivially copyable.

is_trivially_copyable<t_TYPE&&>

This partial specialization optimizes away a number of nested template instantiations to prove that reference types are never trivially copyable.

is_trivially_copyable<t_TYPE[>]

This partial specialization ensures that array‐of‐unknown‐bound types have the same result as their element type.

is_trivially_copyable<t_TYPE volatile[>]

This partial specialization ensures that volatile‐qualified array‐of‐unknown‐bound types have the same result as their element type.

is_trivially_copyable<t_TYPE const[>]

This partial specialization ensures that const‐qualified array‐of‐unknown‐bound types have the same result as their element type.

is_trivially_copyable<t_TYPE const volatile[>]

This partial specialization ensures that const‐volatile‐qualified array‐of‐unknown‐bound types have the same result as their element type.

is_trivially_copyable<t_TYPE[>]

This partial specialization ensures that array types have the same result as their element type.

is_trivially_copyable<t_TYPE volatile[>]

This partial specialization ensures that volatile‐qualified array types have the same result as their element type.

is_trivially_copyable<t_TYPE const[>]

This partial specialization ensures that const‐qualified array types have the same result as their element type.

is_trivially_copyable<t_TYPE const volatile[>]

This partial specialization ensures that const‐volatile‐qualified array types have the same result as their element type.

Derived Classes

Name

Description

IsTriviallyCopyableCheck

Returns the same value as is_trivially_copyable for checking.

Created with MrDocs