[Boost-bugs] [Boost C++ Libraries] #10322: documentation for erase method of multisets is wrong

Subject: [Boost-bugs] [Boost C++ Libraries] #10322: documentation for erase method of multisets is wrong
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-08 00:21:52


#10322: documentation for erase method of multisets is wrong
------------------------------------------+------------------------
 Reporter: Matei David <matei@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: erase multiset documentation |
------------------------------------------+------------------------
 This is a documentation bug.

 The page
 [[http://www.boost.org/doc/libs/1_56_0/doc/html/boost/intrusive/multiset.html#idp34712280-bb|here]]
 states that `erase(const_reference value)` "erases the element pointed to
 by `pos`". First of all, this is a typo because `pos` is not an argument.
 One would assume that the element to be erased is the one referenced by
 `value`.

 It turns out that this is wrong: this overload erases not just one element
 (the given one), but in fact, **all** elements of the multiset with key
 equivalent to the given one (according to the container's internal
 comparator method). This is immediately apparent by looking at the
 definition of `erase(const_reference value)` inside `bstree.hpp`.

 Most likely this affects the documentation for the other multiset variants
 as well (avl, etc).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10322>
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:16 UTC