From 3288059a8f11db3bbaf64c200f32d7b0d597fa13 Mon Sep 17 00:00:00 2001 From: Jan Zizka Date: Mon, 9 Feb 2026 10:36:00 +0200 Subject: [PATCH] Remove std::pair specializations from pair.hpp (moved to Boost.Move) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the std::pair partial specializations for is_trivially_{destructible,copy_constructible,move_constructible, copy_assignable,move_assignable} and has_trivial_destructor_after_move from boost/container/detail/pair.hpp. These specializations are now provided directly in the Boost.Move headers (type_traits.hpp and traits.hpp) alongside the primary template definitions. Placing them in pair.hpp — which is included late in the include chain via flat_map.hpp — caused GCC to diagnose "partial specialization after instantiation" in unity/jumbo builds or any translation unit that implicitly instantiated a trait for std::pair before pair.hpp was included. The dtl::pair specializations remain in pair.hpp since dtl::pair is defined in this header. This is a coordinated fix with the corresponding Boost.Move change. Fixes: https://github.com/boostorg/container/issues/330 Co-authored-by: Cursor --- include/boost/container/detail/pair.hpp | 31 ------------------------- 1 file changed, 31 deletions(-) diff --git a/include/boost/container/detail/pair.hpp b/include/boost/container/detail/pair.hpp index 1f263dd3..cd4fb2d0 100644 --- a/include/boost/container/detail/pair.hpp +++ b/include/boost/container/detail/pair.hpp @@ -563,11 +563,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 +577,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 +591,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 +605,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 +615,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 +627,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