3rdParty/boost/1.78.0/libs/multi_index/doc/release_notes.html
Added contains to key-based indices (issue #35).
Added merge operations to key-based indices. The functionality goes beyond the standard specification for (unordered) associative containers in a number of ways, most notably:
x.merge(y,first,last) merges only the elements of y within [first,last).Previous versions of splice for sequenced and random access indices were destructive, i.e. elements were copy-inserted into the destination and then erased from the source. Now, splice is based on node transfer much as merge in key-based indices, and has been similarly extended to accept source indices of any type: in fact, splice can be regarded as a frontend to the same functionality provided by merge in key-based indices. For reasons of backwards compatibility, the destructive behavior of splice has been retained in the case that the source and destination containers have unequal allocators.
The fact has been documented that index iterator types do only depend on node_type and the position of the index in its multi_index_container, (except for hashed indices, where uniqueness/non-uniqueness is also a dependency). This has implications on the validity of iterators to elements transferred by merge or splice. This property is a variant of what has been called SCARY iterators in the C++ standard mailing lists. SCARYness is currently (August 2021) not mandated for standard containers.
Iterator SCARYness is now also preserved in safe mode.
multi_index_container is now AllocatorAware.KeyFromValue, Compare, Hash and Pred objects now selects the appropriate swap function between std::swap and ADL candidates, in accordance with standard specifications in [swappable.requirements] (issue #29).const_mem_fun and mem_fun for differently qualified member functions (issue #24).noexcept-specified member functions (issue #24).size_type and difference_type are now defined as the allocator's same-named types. This will not make any difference in the vast majority of cases, but allows for some degree of control of resulting internal structures via user-defined allocator types (see issue #17 for motivation). For the moment being, this change is not documented in the reference section (i.e., it has semi-official status).multi_index_container's default constructor is no longer explicit (ticket #13518).operator& are now fully accepted (ticket #13307). Thanks to Daniel Frey for his updating Boost.Operators to help fix this issue.std::allocator members deprecated in C++17. Contributed by Daniela Engert.modify and modify_key more robust so that the modified element is erased if the modifier throws or the rollback functor does not properly restore the element (full discussion at ticket #12542). This is technically backwards incompatible; for instance, the following code:c.modify(c.begin(),[](auto&){throw0;});
keeps the container c untouched in former versions of Boost whereas now c.begin() is erased. Thanks to Jon Kalb for raising the issue.
foreach in this framework.key_type. Consider for instance the following code:typedefmulti\_index\_container\<std::string,indexed\_by\<ordered\_unique\<identity\<std::string\>\>\>\>multi\_t;...multi\_tm=...;m.find("boost");// passed a const char\*, not a std::string
In previous versions of the library, the find operation generates several temporary std::strings (one every time an internal comparison is made). In sufficiently advanced compilers, this is now avoided so that only one temporary is created.
std::tuples are available, these can be used for lookup operations in indices equipped with composite keys. boost::tuples are also supported for backwards compatibility.erase(iterator) member function of hashed indices used to have poor performance under low load conditions due to the requirement that an iterator to the next element must be returned (see ticket #4264). In accordance with the resolution of LWG issue #579, this problem has been fixed while maintaining the interface of erase, at the expense of using one more word of memory per element. In fact, C++ complexity requirements on unordered associative containers have been improved for hashed indices so that
O(n) but O(ndist), where ndist is the number of non-equivalent elements in the index.Due to the fact that hashed indices rely on a new data structure, the internal representation of their iterators and local iterators have changed, which affects serialization: their corresponding serialization class version has been bumped from 0 to 1. Old archives involving hashed index (local) iterators can be loaded by Boost 1.56 version of Boost.MultiIndex, but not the other way around.
reserve.noexcept specifications where appropriate (for compliant compilers).multi_index_container.BOOST_BIND_NO_PLACEHOLDERS (ticket #9798).multi_index_container is now efficiently movable.std::unique_ptr<T>) supported. This includes insertion of a range [first,last) where the iterators point to a type that is convertible to that of the element: no copy construction happens in the process.shrink_to_fit().Refer to the compiler specifics section for limitations on pre-C++11 compilers.
The following classes are deprecated:
Maintenance fixes.
composite_key_compare related with Boost.Ref.modify_key with rollback in ordered and hashed indices when Modifier and Rollback are different types (ticket #4130).save_construct_data and load_construct_data. multi_index_container serialization class version has been bumped from 1 to 2.collection_size_type type instead of the original std::size_t (ticket #3365). multi_index_container serialization class version has been bumped from 0 to 1.nth_index_iterator<MultiIndexContainer,N>::type,multi_index_container<...>::nth_index_iterator<N>::type,nth_index_const_iterator<MultiIndexContainer,N>::type,multi_index_container<...>::nth_index_const_iterator<N>::type,index_iterator<MultiIndexContainer,Tag>::type,multi_index_container<...>::index_iterator<Tag>::type,index_const_iterator<MultiIndexContainer,Tag>::type,multi_index_container<...>::index_const_iterator<Tag>::type.Use the following instead:
nth_index<MultiIndexContainer,N>::type::iterator,
multi_index_container<...>::nth_index<N>::type::iterator,
nth_index<MultiIndexContainer,N>::type::const_iterator,
multi_index_container<...>::nth_index<N>::type::const_iterator,
index<MultiIndexContainer,Tag>::type::iterator,
multi_index_container<...>::index<Tag>::type::iterator,
index<MultiIndexContainer,Tag>::type::const_iterator,
multi_index_container<...>::index<Tag>::type::const_iterator.
Maintenance fixes.
multi_index_container::multi_index_container(const allocator_type&) to mimic the equivalent interface in STL sequence containers.global_fun predefined key extractor.iterator_to facility.multi_index_containers placeable in shared memory.modify and modify_key with rollback, as described in the tutorial.cbegin, cend and, when applicable, crbegin and crend member functions, in accordance with the latest drafts of the next revision of the C++ standard.assign(f,l) and insert(p,f,l) (23.1.1/9): if f and l are of the same integral type, the iterator-based overloads of these member functions are avoided:typedefmulti\_index\_container\<int,indexed\_by\<sequenced\<\>\>\>sequenced\_container;std::list\<int\>l(...);sequenced\_containerc;// iterator-based overload of assignc.assign(l.begin(),l.end());// The following is equivalent to // c.assign( // static\_cast\<sequenced\_container::size\_type\>(10),100); // that is, "10" and "100" are not taken to be iterators as // in the previous expression.c.assign(10,100);
range and equal_range has been improved.T can handle objects of types derived from or convertible to T (and chained pointers to those). Previously, only objects of the exact type specified (along with reference_wrappers and chained pointers to them) were accepted.composite_key_compare and related classes accept operands not included in tuples as if they were passed in a tuple of length 1; this allows the user to omit tuple enclosing in lookup operations involving composite keys when only the first key is provided.erase(it) and erase(first,last) now return an iterator to the element following those being deleted (previously nothing was returned), in accordance with the C++ Standard Library Defect Report 130 and issue 6.19 of TR1 Issues List.In previous versions of the library, the latter guarantee was not properly maintained if the safe mode was set. This problem has been fixed now.
multi_index_containers and clear memfuns now perform faster.Revised August 30th 2021
© Copyright 2003-2021 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)