Boost C++ Libraries: Ticket #11843: shared_ptr hash support doesn't work for shared_ptr<T[]> or shared_ptr<T[N]> https://svn.boost.org/trac10/ticket/11843 <p> Repro: </p> <pre class="wiki">#include &lt;boost/functional/hash.hpp&gt; #include &lt;boost/shared_ptr.hpp&gt; int main(){ boost::shared_ptr&lt;int[2]&gt; a; boost::shared_ptr&lt;int[]&gt; b; boost::hash_value(a); boost::hash_value(b); } </pre><p> The <code>hash_value</code> overload for <code>shared_ptr&lt;T&gt;</code> returns <code>boost::hash&lt; T* &gt;()( p.get() )</code>. It should presumably return <code>boost::hash&lt;typename shared_ptr&lt;T&gt;::element_type*&gt;()(p.get())</code> instead. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11843 Trac 1.4.3 Peter Dimov Tue, 15 Dec 2015 17:15:30 GMT <link>https://svn.boost.org/trac10/ticket/11843#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11843#comment:1</guid> <description> <p> Should be fixed in <a class="ext-link" href="https://github.com/boostorg/smart_ptr/commit/4473bf8ec2a1a124713dcc4183d6c120f5191305"><span class="icon">​</span>https://github.com/boostorg/smart_ptr/commit/4473bf8ec2a1a124713dcc4183d6c120f5191305</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>