Skip to content

Conversation

@janzizazizka
Copy link

Remove the std::pair<A,B> 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: #330

Remove the std::pair<A,B> 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: boostorg#330
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boost/container/detail/pair.hpp: partial specializations of boost::move_detail traits for std::pair break Unity (jumbo) builds

1 participant