boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

Several containers don't support non-movable types when move assigning #280

Closed igaztanaga closed 1 month ago

igaztanaga commented 1 month ago

When allocators (like std::allocator) are always equal or implement propagate_on_container_move_assignment is true, according to the C++ standard a container supports types without a move constructor.

Many Boost.Container containers don't support this because several checks are done in runtime instead of compile time, provoking the instantiation of the move assignment operation. Compile-time dispatching should be used when appropriate with allocator attributes to support such non-movable types in Boost.Container.