Back to Arangodb

Boost.MultiIndex Release notes

3rdParty/boost/1.78.0/libs/multi_index/doc/release_notes.html

3.12.9.120.7 KB
Original Source

Boost.MultiIndex Release notes


Future work


Index


Acknowledgements


Contents

Boost 1.78 release

  • 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:

    • The source index can be of any type, including non key-based indices.
    • Partial merge is provided: for instance, 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.

Boost 1.77 release

  • Maintenance work.

Boost 1.74 release

  • Added node extraction and insertion following the analogous interface of associative containers as introduced in C++17. This feature has also been extended to non key-based indices, in contrast to C++ standard library sequence containers, which do not provide such functionality.
  • Clarified documentation on read/write key extractors (issue #32).
  • Maintenance work.

Boost 1.73 release

  • multi_index_container is now AllocatorAware.
  • Swapping of internal 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).
  • Provided some internal copy constructors and assignment operators whose default implicit definition is deprecated in C++11 onwards ([depr.impldec]), which was warned about on some compilers.
  • Maintenance work.

Boost 1.71 release

Boost 1.70 release

  • 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).
  • Maintenance work.

Boost 1.69 release

Boost 1.68 release

  • Containers of moveable but non-copyable elements can now be serialized (ticket #13478). Thanks to Sébastien Paris for the report.
  • multi_index_container's default constructor is no longer explicit (ticket #13518).

Boost 1.67 release

  • Elements with overloaded operator& are now fully accepted (ticket #13307). Thanks to Daniel Frey for his updating Boost.Operators to help fix this issue.
  • Avoided usage of std::allocator members deprecated in C++17. Contributed by Daniela Engert.
  • Maintenance fixes.

Boost 1.66 release

  • Made 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.

  • Maintenance fixes.

Boost 1.64 release

  • Fixed a bug related to ambiguous references in the presence of more than one ranked index (ticket #12955).
  • Maintenance fixes.

Boost 1.62 release

  • Maintenance fixes.

Boost 1.60 release

  • Fixed an interoperability problem with Qt due to the optional definition of a macro with name foreach in this framework.
  • Maintenance fixes.

Boost 1.59 release

Boost 1.58 release

  • The efficiency of lookup operations has improved in situations where they involve the generation of temporary values of 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.

  • Maintenance fixes.

Boost 1.57 release

  • When 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.

Boost 1.56 release

  • The 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
    • deletion of a given element is unconditionally constant-time,
    • worst-case performance is not 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.

  • Hashed indices now provide reserve.
  • Hashed indices can now be checked for equality and inequality following the (suitably adapted) C++ standard specification in [unord.req].
  • The public interface of Boost.MultiIndex provide noexcept specifications where appropriate (for compliant compilers).
  • Improved performance of failed insertions into a multi_index_container.
  • Much internal code aimed at supporting MSVC++ 7.0 and prior has been removed. Compilation times without this legacy code might be slightly faster.
  • Fixed a bug with insertion via iterators dereferencing to rvalues (ticket #9665).
  • Made Boost.MultiIndex compatible with BOOST_BIND_NO_PLACEHOLDERS (ticket #9798).
  • Maintenance fixes.

Boost 1.55 release

  • Boost.MultiIndex has been brought to a higher level of compliance with C++11.
    • multi_index_container is now efficiently movable.
    • Initializer lists supported.
    • Emplace functions provided.
    • Non-copyable elements (such as 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.
    • Random access indices provide shrink_to_fit().

Refer to the compiler specifics section for limitations on pre-C++11 compilers.

Boost 1.54 release

  • Suppressed some potential warnings described in tickets #8034 and #8129.
  • Maintenance fixes.

Boost 1.49 release

  • Suppressed a potential narrow conversion warning described in ticket #3365.

Boost 1.48 release

Boost 1.47 release

Boost 1.44 release

  • Fixed a bug preventing the use of modify_key with rollback in ordered and hashed indices when Modifier and Rollback are different types (ticket #4130).

Boost 1.43 release

Boost 1.42 release

  • Maintenance fixes.

Boost 1.41 release

  • Serialization now uses the portable 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.
  • Fixed a concurrency bug in the implementation of safe mode (ticket #3462).

Boost 1.38 release

  • These constructs are deprecated:
    • 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.

Boost 1.37 release

  • Maintenance fixes.

Boost 1.36 release

  • On prior versions of the library, the update member functions of hashed indices could alter the position of an element even if the associated key did not change with the update. This is legal but probably unexpected behavior. The functions have been rewritten to provide the additional guarantee that elements with unmodified key will not change position in hashed indices, just as always was the case with ordered indices. These guarantees are now documented in the reference.
  • Added the constructor multi_index_container::multi_index_container(const allocator_type&) to mimic the equivalent interface in STL sequence containers.
  • Maintenance fixes.

Boost 1.35 release

  • New global_fun predefined key extractor.
  • Added iterator_to facility.
  • Included support for non-standard allocators such as those of Boost.Interprocess, which makes multi_index_containers placeable in shared memory.
  • New versions of modify and modify_key with rollback, as described in the tutorial.
  • Indices provide the new cbegin, cend and, when applicable, crbegin and crend member functions, in accordance with the latest drafts of the next revision of the C++ standard.
  • Hinted insertion in ordered indices fully conforms to the resolutions of C++ Standard Library Defect Report 233. The new requirement that the point of insertion be always as close as possible to the hint induces a different behavior than exhibited in former releases of Boost.MultiIndex, which can potentially cause backwards compatibility problems; in any case, the likelihood of these compatibility issues arising in a real scenario is very low.
  • Sequenced and random access indices now follow the requirements of the C++ standard for sequence containers with respect to the operations 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);
  • The performance of ordered indices range and equal_range has been improved.
  • Maintenance fixes.

Boost 1.34 release

  • Added random access indices.
  • Non key-based indices provide new rearrange facilities allowing for interaction with external mutating algorithms.
  • All predefined Boost.MultiIndex key extractors instantiated for a given type 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.
  • The core algorithms of ordered indices have been optimized, yielding an estimated reduction of about 5% in insertion times.
  • Size of ordered indices node headers have been reduced by 25% on most platforms, using a well known optimization technique.
  • The tutorial has been restructured, new examples added.
  • Maintenance fixes.

Boost 1.33.1 release

  • For ordered and hashed indices, 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.
  • Boost.MultiIndex offers the usual guarantees with respect to multithreading code provided by most STL implementations:
    1. Concurrent access to different containers is safe.
    2. Concurrent read-only access to the same container is safe.

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.

  • Maintenance fixes.

Boost 1.33 release

  • Added hashed indices, whose interface is based on the specification for unordered associative containers by the C++ Standard Library Technical Report (TR1).
  • Added serialization support for Boost.Serialization.
  • Destruction of multi_index_containers and clear memfuns now perform faster.
  • Internal changes aimed at reducing the length of symbol names generated by the compiler; cuts of up to a 50% can be achieved with respect to the Boost 1.32 release. This results in much shorter and more readable error messages and has also a beneficial impact on compilers with strict limits on symbol name lengths. Additionally, a section on further reduction of symbol name lengths has been added.
  • Restructured some parts of the documentation, new examples.
  • Maintenance fixes.


Future work


Index


Acknowledgements

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)