Boost.MultiIndex Release notes
key_type. Consider for instance
the following code:
In previous versions of the library, thetypedef multi_index_container< std::string, indexed_by< ordered_unique<identity<std::string> > > > multi_t; ... multi_t m=...; m.find("boost"); // passed a const char*, not a std::string
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.
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().
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.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.
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:
typedef multi_index_container< int,indexed_by<sequenced<> > > sequenced_container; std::list<int> l(...); sequenced_container c; // iterator-based overload of assign c.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.
multi_index_containers and clear
memfuns now perform faster.
Revised April 19th 2015
© Copyright 2003-2015 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)