Re: [Boost-bugs] [Boost C++ Libraries] #5991: find_ptr (find wrapper)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5991: find_ptr (find wrapper)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-03 13:14:30


#5991: find_ptr (find wrapper)
-------------------------------------------------------+--------------------
  Reporter: Olaf van der Spek <olafvdspek@…> | Owner: joaquin
      Type: Feature Requests | Status: closed
 Milestone: To Be Determined | Component: multi_index
   Version: Boost 1.47.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------------------------------+--------------------

Comment (by joaquin):

 Replying to [comment:4 Olaf van der Spek <olafvdspek@…>]:
> The map variant returns a pointer to second. A variant for containers
 that store pointers performs an additional dereference.

 Why a pointer to second? This is not consistent with the semantics of
 std::map, which returns an iterator to the whole element (the key-value
 pair), not the value alone.

> IMO the wrapper is useful every time you use a map like container.

 In either case, find_ptr can be provided as an (overloaded) function, no
 need to have as a built-in member function. Thus my reluctance to address
 your request.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5991#comment:6>
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:07 UTC