[Boost-bugs] [Boost C++ Libraries] #11843: shared_ptr hash support doesn't work for shared_ptr<T[]> or shared_ptr<T[N]>

Subject: [Boost-bugs] [Boost C++ Libraries] #11843: shared_ptr hash support doesn't work for shared_ptr<T[]> or shared_ptr<T[N]>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-13 03:07:33


#11843: shared_ptr hash support doesn't work for shared_ptr<T[]> or
shared_ptr<T[N]>
------------------------------+-----------------------
 Reporter: rs2740@… | Owner: pdimov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 Repro:
 {{{
 #include <boost/functional/hash.hpp>
 #include <boost/shared_ptr.hpp>

 int main(){
     boost::shared_ptr<int[2]> a;
     boost::shared_ptr<int[]> b;
     boost::hash_value(a);
     boost::hash_value(b);
 }
 }}}
 The `hash_value` overload for `shared_ptr<T>` returns `boost::hash< T*
>()( p.get() )`. It should presumably return `boost::hash<typename
 shared_ptr<T>::element_type*>()(p.get())` instead.

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