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-10-10 09:21:34


#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 Olaf van der Spek <olafvdspek@…>):

 Replying to [comment:3 joaquin]:
> > Already got one for std::map etc, but not yet for std::set. I thought
 multi_index required a different function, but it can use the same as
 std::set. So it probably shouldn't be a member function.
>
> What's wrong with the example find_ptr function template given above? It
 should work with any container providing a find member function --I don't
 see the need to have separate functions for map, set, etc.

 The map variant returns a pointer to second. A variant for containers that
 store pointers performs an additional dereference.
 IMO the wrapper is useful every time you use a map like container.

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