[Boost-bugs] [Boost C++ Libraries] #4493: shared_array lacks get_deleter method

Subject: [Boost-bugs] [Boost C++ Libraries] #4493: shared_array lacks get_deleter method
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-29 21:02:34


#4493: shared_array lacks get_deleter method
---------------------------------------------------------------+------------
 Reporter: Matthew Carter <r_q_einstein-boostbugs@…> | Owner: no-maintainer
     Type: Feature Requests | Status: new
Milestone: Boost 1.44.0 | Component: array
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
---------------------------------------------------------------+------------
 shared_ptr has a get_deleter() method, which is very useful.
 shared_array does not have a get_deleter() method.

 Since the deleter for a shared_array is passed to the constructor by
 value, there is no straightforward way* for the caller to get a pointer or
 reference to it. If the caller needs access to the deleter object's state
 or methods, which is entirely reasonable, the caller has no way to get it.

 A get_deleter() method should be added to shared_array to meet this
 requirement and for consistency with the shared_ptr class.

 *True, the caller can pass the deleter wrapped in a container object that
 holds a reference to the deleter, but that's a contortion that should not
 be necessary.

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