Subject: [Boost-bugs] [Boost C++ Libraries] #8069: Boost unordered_map iterator bug
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-15 15:02:07
#8069: Boost unordered_map iterator bug
------------------------------------------------------+---------------------
Reporter: Karalis Apostolos <tolis@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.53.0
Severity: Problem | Keywords:
------------------------------------------------------+---------------------
The documentation
(http://www.boost.org/doc/libs/1_53_0/doc/html/boost/unordered_map.html)
states that mapped_type& operator[](key_type const& k) function
can invalidate iterators, but only if the insert causes the load factor to
be greater to or equal to the maximum load factor.
In particular, this does not happen. I have written a simple test for
this. I compare boost::unordered_map with std::tr1::unordered_map. The
former does not guarantuees that iterators are still valid if the insert
DOES NOT cause the load factor to be greater to or equal to the maximum
load factor.
I run tests with g++4.7.2 and boost 1.53.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8069> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC