- To avoid unneeded includes, is_pair is factored out from pair.hpp implementation
- Fixed bug where value_types inside nodes were not allocator-ware destructed.
- Changed scoped utilities to handle new clases
This allows std::is_nothrow_swappable{,_with} to work properly.
This only touches user-facing classes, with the following exceptions:
- map,set: only doc changes (with a drive-by missing semicolon fix),
detail::tree which they derive from already forwards noexcept for swap.
- flat_set: only doc changes for flat_set and a change for
detail::flat_tree, which it derives from to get swap.
- static_vector: while this adds the forwarding, member static_vector::swap
is currently never noexcept, although it could be for noexcept-swappable
and noexcept-move-constructible elements.
- small_vector: there is no free swap, and member swap is never noexcept,
although it could be for noexcept-swappable and noexcept-move-
constructible elements. Swapping small_vectors of exact same type goes
through std::swap, which seems to get noexcept right, and small_vectors
of different sizes use swap for boost::container::vector, which fails
to detect when such swap could be noexcept. This patch doesn't touch
small_vector.
- scoped_allocator: neither member nor free swap are noexcept, although
they should be, and all other constructions/assignments/comparisons too,
as they only forward these operations to underlying allocators, which
are required to not throw exceptions for them. Only static_vector's
static_storage_allocator might throw for these and it shouldn't appear
in scoped_allocator. Unsure of the scope of changes needed or whether it
is even worth it, this patch doesn't touch scoped_allocator.
Most template type parameters 'Allocator' were modified their default type to void since 1.70.0.
These modifications cause has_trivial_destructor_after_move to compile error or yield wrong result.
So, fix them by changing specializations of has_trivial_destructor_after_move.
- Avoid deriving from std::iterator_traits as iterators become too fat.
- Use intrusive's reverse_iterator some std::reverse_iterator-s don't value initialize base.
* Optimized insert_equal(ordered_range_t,...) and insert_unique(ordered_unique_range_t, ...) for elements to be inserted in the end.
* Added range insertion overload (non-standard extension) to vector taking the number of elements to avoid reiterations with std::distance.
Uses intrusive is_convertible in MSVC compilers.
Removes some throw conditions in the documentation produced by the allocator copy constructor (as the standard requires no-throw guarantee for those).