mirror of
https://github.com/boostorg/move.git
synced 2026-07-21 13:23:29 +00:00
Fixes #64: ("Add std::pair specializations for trivial type traits").
This commit is contained in:
@@ -802,6 +802,13 @@ Special thanks to:
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[section:release_notes_boost_1_91 Boost 1.91 Release]
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://github.com/boostorg/move/pull/64 Git Issue #64: ['"Add std::pair specializations for trivial type traits"]].
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:release_notes_boost_1_90 Boost 1.90 Release]
|
||||
|
||||
* Fixed bugs:
|
||||
|
||||
@@ -1352,6 +1352,82 @@ struct aligned_storage
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
|
||||
#include <boost/move/detail/std_ns_begin.hpp>
|
||||
BOOST_MOVE_STD_NS_BEG
|
||||
|
||||
template<class T1, class T2>
|
||||
struct pair;
|
||||
|
||||
BOOST_MOVE_STD_NS_END
|
||||
#include <boost/move/detail/std_ns_end.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_assignable<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_copy_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_assignable<B>::value;
|
||||
};
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_assignable<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_move_assignable<B>::value;
|
||||
};
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_constructible<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_constructible<B>::value;
|
||||
};
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_constructible<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_move_constructible<B>::value;
|
||||
};
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_destructible<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_destructible<A>::value &&
|
||||
boost::move_detail::is_trivially_destructible<B>::value;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_union< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class_or_union< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
@@ -57,6 +57,17 @@ struct has_nothrow_move
|
||||
boost::move_detail::is_nothrow_move_assignable<T>::value;
|
||||
};
|
||||
|
||||
#ifndef BOOST_MOVE_DOXYGEN_INVOKED
|
||||
|
||||
template<class A, class B>
|
||||
struct has_trivial_destructor_after_move<std::pair<A,B> >
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::has_trivial_destructor_after_move<A>::value &&
|
||||
boost::has_trivial_destructor_after_move<B>::value;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
namespace move_detail {
|
||||
|
||||
template <class T>
|
||||
|
||||
Reference in New Issue
Block a user