From 958fe7d326513d7193cfd522334291869b029da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 16 Feb 2026 22:53:37 +0100 Subject: [PATCH] Fixes #330: ("boost/container/detail/pair.hpp: partial specializations of boost::move_detail traits for std::pair break Unity (jumbo)") --- doc/container.qbk | 1 + include/boost/container/detail/pair.hpp | 57 +------------------------ 2 files changed, 2 insertions(+), 56 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 168819a..8592f9c 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1489,6 +1489,7 @@ collect them containers and build [*Boost.Container], a library targeted to a wi * Fixed bugs/issues: * [@https://github.com/boostorg/container/issues/323 GitHub #323: ['"flat_tree::try_emplace UB"]]. * [@https://github.com/boostorg/container/issues/328 GitHub #328: ['"boost::container::deque stores a redundant copy of the allocator, increasing size"]]. + * [@https://github.com/boostorg/container/issues/330 GitHub #330: ['"boost/container/detail/pair.hpp: partial specializations of boost::move_detail traits for std::pair break Unity (jumbo)"]]. [endsect] diff --git a/include/boost/container/detail/pair.hpp b/include/boost/container/detail/pair.hpp index 1f263dd..b61f080 100644 --- a/include/boost/container/detail/pair.hpp +++ b/include/boost/container/detail/pair.hpp @@ -500,14 +500,6 @@ struct is_class_or_union< ::boost::container::dtl::pair > BOOST_STATIC_CONSTEXPR bool value = true; }; -template -struct is_class_or_union< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - BOOST_STATIC_CONSTEXPR bool value = true; -}; - template struct is_union; @@ -519,14 +511,6 @@ struct is_union< ::boost::container::dtl::pair > BOOST_STATIC_CONSTEXPR bool value = false; }; -template -struct is_union< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - BOOST_STATIC_CONSTEXPR bool value = false; -}; - template struct is_class; @@ -538,16 +522,8 @@ struct is_class< ::boost::container::dtl::pair > BOOST_STATIC_CONSTEXPR bool value = true; }; -template -struct is_class< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - BOOST_STATIC_CONSTEXPR bool value = true; -}; - - //Triviality of pair +// std::pair specializations defined in Boost.Move // // is_trivially_copy_assignable @@ -563,11 +539,6 @@ struct is_trivially_copy_assignable > boost::move_detail::is_trivially_copy_assignable::value; }; -template -struct is_trivially_copy_assignable > - : is_trivially_copy_assignable > -{}; - // // is_trivially_move_assignable // @@ -582,12 +553,6 @@ struct is_trivially_move_assignable > boost::move_detail::is_trivially_move_assignable::value; }; -template -struct is_trivially_move_assignable > - : is_trivially_move_assignable > -{}; - - // // is_trivially_copy_constructible // @@ -602,11 +567,6 @@ struct is_trivially_copy_constructible > boost::move_detail::is_trivially_copy_constructible::value; }; -template -struct is_trivially_copy_constructible > - : is_trivially_copy_constructible > -{}; - // // is_trivially_move_constructible // @@ -621,11 +581,6 @@ struct is_trivially_move_constructible > boost::move_detail::is_trivially_move_constructible::value; }; -template -struct is_trivially_move_constructible > - : is_trivially_move_constructible > -{}; - template struct is_trivially_destructible; @@ -636,11 +591,6 @@ struct is_trivially_destructible > boost::move_detail::is_trivially_destructible::value; }; -template -struct is_trivially_destructible > - : is_trivially_destructible > -{}; - } //namespace move_detail{ template @@ -653,11 +603,6 @@ struct has_trivial_destructor_after_move > boost::has_trivial_destructor_after_move::value; }; -template -struct has_trivial_destructor_after_move > - : has_trivial_destructor_after_move > -{}; - } //namespace boost { #include