...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Initial review version, for the review conducted from 7th December 2007 to 16th December 2007.
Unofficial release uploaded to vault, to be used with Boost 1.35.0. Incorporated many of the suggestions from the review.
std::size_t
conversion when calculating sizes from the max load factor, and use double
in the calculation for greater accuracy.
First official release.
emplace
with hint, to emplace_hint
as specified in n2691.
<boost/unordered/unordered_map_fwd.hpp>
and <boost/unordered/unordered_set_fwd.hpp>
.
boost/unordered
,
to assist modularization and hopefully make it easier to track changes
in subversion.
boost::swap
.
construct
method - once for the pointers and once for the value. It now constructs
the node with a single call to construct and then constructs the value
using in place construction.
operator[]
.
emplace
for all
compilers.
boost::compressed_pair
for EBO and a slightly different function buffer - now using a bool instead
of a member pointer.
erase_return_void
as
a temporary workaround for the current erase
which can be inefficient because it has to find the next element to return
an iterator.
std
qualifier
to ptrdiff_t
.
erase_return_void
is now
quick_erase
, which is the
current
forerunner for resolving the slow erase by iterator, although there's
a strong possibility that this may change in the future. The old method
name remains for backwards compatibility but is considered deprecated and
will be removed in a future release.
BOOST_HAS_*
macros.
unordered_map
or unordered_set
using
iterators which returns value_type
by copy.
This is major change which has been converted to use Boost.Move's move emulation, and be more compliant with the C++11 standard. See the compliance section for details.
The container now meets C++11's complexity requirements, but to do so uses
a little more memory. This means that quick_erase
and erase_return_void
are no
longer required, they'll be removed in a future version.
C++11 support has resulted in some breaking changes:
BOOST_UNORDERED_DEPRECATED_EQUALITY
.
propagate_on_container_swap
,
such that propagate_on_container_swap::value
is true.
construct
and
destroy
functions are called
with raw pointers, rather than the allocator's pointer
type.
emplace
used to emulate
the variadic pair constructors that appeared in early C++0x drafts. Since
they were removed it no longer does so. It does emulate the new piecewise_construct
pair constructors
- only you need to use boost::piecewise_construct
.
To use the old emulation of the variadic constructors define BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
unordered_multiset
and unordered_multimap
.
reserve
.
-Wfloat-equal
warning.
-Wshadow
warning.
bcp
custom namespaces. Fixed by Luke Elliott.
allocator_traits
, as
it's more likely to work.
erase_range
(#7471).
erase
.
noexpect
.
More to come in the next release.
iterator
typedef in some iterator classes, as it confuses some traits classes.
boost::iterator
.
BOOST_NO_STD_DISTANCE
workaround.
BOOST_UNORDERED_DEPRECATED_EQUALITY
warning.
unordered_multiset
and
unordered_multimap
. Might
be a little slower.
insert
/emplace_hint
.
emplace_args
for small numbers of arguments - should make template error messages a
little more bearable.
boost::forward
in emplace arguments, which fixes emplacing string literals in old versions
of Visual C++.
insert_or_assign
and try_emplace
in unordered_map
,
merge
and extract
. Does not include
transferring nodes between unordered_map
and unordered_multimap
or between unordered_set
and unordered_multiset
yet. That will hopefully be in the next version of Boost.
quick_erase
and erase_return_void
.
I really will remove them in a future version this time.
noexpect
specs for
swap
free functions.
insert(P&&)
methods.
optional
in node handles, so that they're closer to the standard.
noexcept
specifications to swap
,
operator=
and node handles, and change the implementation to match. Using
std::allocator_traits::is_always_equal
, or our own implementation
when not available, and boost::is_nothrow_swappable
in the implementation.
boost::to_address
, which has the proposed
C++20 semantics, rather than the old custom implementation.
element_type
to iterators,
so that std::pointer_traits
will work.
std::piecewise_construct
on recent versions
of Visual C++, and other uses of the Dinkumware standard library, now using
Boost.Predef to check compiler and library versions.
std::iterator_traits
rather than the boost
iterator traits in order to remove dependency on Boost.Iterator.
std::iterator
,
which is deprecated in C++17, thanks to Daniela Engert (PR#7).
BOOST_DEDUCED_TYPENAME
.