More traits to support additional triviality for pair.

This commit is contained in:
Ion Gaztañaga
2018-06-16 14:45:20 +02:00
parent 62ee740368
commit 4faa05e36c

View File

@@ -550,6 +550,11 @@ struct is_class< std::pair<T1, T2> >
static const bool value = true;
};
//Triviality of pair
template<class T>
struct is_trivially_copy_constructible;
template<class A, class B>
struct is_trivially_copy_assignable
<boost::container::dtl::pair<A,B> >
@@ -558,6 +563,48 @@ struct is_trivially_copy_assignable
boost::move_detail::is_trivially_copy_assignable<B>::value ;
};
template<class T>
struct is_trivially_move_constructible;
template<class A, class B>
struct is_trivially_move_assignable
<boost::container::dtl::pair<A,B> >
{
static const bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
boost::move_detail::is_trivially_move_assignable<B>::value ;
};
template<class T>
struct is_trivially_copy_assignable;
template<class A, class B>
struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
{
static const bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
boost::move_detail::is_trivially_copy_constructible<B>::value ;
};
template<class T>
struct is_trivially_move_assignable;
template<class A, class B>
struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
{
static const bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
boost::move_detail::is_trivially_move_constructible<B>::value ;
};
template<class T>
struct is_trivially_destructible;
template<class A, class B>
struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
{
static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
boost::move_detail::is_trivially_destructible<B>::value ;
};
} //namespace move_detail{
} //namespace boost {