Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6437: Documentation bug: ptr_map inherits from ptr_map_adapter, not ptr_multi_map_adapter (was: Documentation bug about ptr_multi_map_adapter::insert(...) return value)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-23 13:03:57
#6437: Documentation bug: ptr_map inherits from ptr_map_adapter, not
ptr_multi_map_adapter
-----------------------------------------------------+----------------------
Reporter: augustin <augustin_boost@â¦> | Owner: nesotto
Type: Bugs | Status: new
Milestone: To Be Determined | Component: ptr_container
Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------------+----------------------
Comment (by augustin <augustin_boost@â¦>):
Oh! I am wrong above, but the documentation is also wrong!
I confused ptr_map_adapter::insert( key_type& k, T* x ) and
ptr_multimap_adapter::insert( key_type& k, T* x ) !!
ptr_map inherits from ptr_map_adapter and not ptr_multimap_adapter.
However, the layout of the documentation makes it appear that it's the
opposite: ptr_map is a leaf on the ptr_multimap_adapter branch:
http://www.boost.org/doc/libs/1_42_0/libs/ptr_container/doc/ptr_multimap_adapter.html
Same problem with ptr_set and ptr_multi_set.
Also, still in the documentation, the 'branch' is named
'ptr_multi_map_adapter' instead of 'ptr_multimap_adapter' (notice the
extra underscore, compared to the actual class name). This could be
another source of confusion.
Lastly, back to my original topic, why do we have different return values
for the following two functions (pair and iterator)?
{{{
std::pair<iterator,bool> ptr_map_adapter::insert( key_type& k, T* x )
}}}
and
{{{
iterator ptr_multimap_adapter::insert( key_type& k, T* x ) !!
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6437#comment:1> 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:08 UTC