Re: [Boost-bugs] [Boost C++ Libraries] #2484: Const-overload needed for bimap associative_container_adaptor::count()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2484: Const-overload needed for bimap associative_container_adaptor::count()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-09 09:28:34


#2484: Const-overload needed for bimap associative_container_adaptor::count()
--------------------------------+-------------------------------------------
 Reporter: mlcreech@… | Owner: matias
     Type: Patches | Status: new
Milestone: Boost 1.38.0 | Component: bimap
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------

Comment(by Gonzalo Matamala <gonmator@…>):

 I think overloading count() is a wrong fix. The right fix is just adding
 const qualifier.

 The C++ standard declare const() member of map, multimap, set and multi
 set as const [23.3.1, 23.3.2, 23.3.3, 23.3.4]:

 {{{
 size_type count(const key_type& x) const;
 }}}

 Also, the bimap documentation
 ([http://www.boost.org/doc/libs/1_40_0/libs/bimap/doc/html/boost_bimap/reference/set_of_reference.html#boost_bimap.reference.set_of_reference.__multi__set_of_views.set_operations])
 declare count() member of

 {{{
 [multi]set_of as const:
 template< class CompatibleKey >
 size_type count(const key_type & x) const;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2484#comment:2>
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:01 UTC