Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7100: unorderd_set<shared_ptr<T> > > - insert does not increment count
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-09 02:46:50
#7100: unorderd_set<shared_ptr<T> > > - insert does not increment count
------------------------------------------------+---------------------------
Reporter: Rich Eakin <reakinator@â¦> | Owner: danieljames
Type: Bugs | Status: new
Milestone: To Be Determined | Component: unordered
Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords: unordered_set shared_ptr
------------------------------------------------+---------------------------
Comment (by Rich Eakin <reakinator@â¦>):
Thanks for the fix, I can confirm that insert increments the ref count
with boost::unordered_set<boost::shared_ptr<T< >.
However, I think it has created a problem when using std::tr1::shared_ptr.
Albeit an odd setup, the following example produces a compile time error:
{{{
#include "boost/unordered_set.hpp"
#include <tr1/memory>
int main()
{
boost::unordered_set<std::tr1::shared_ptr<int> > mySet;
std::tr1::shared_ptr<int> intSP( new int( 1 ) );
mySet.insert( intSP ); // <-- Error: (Semantic Issue) "no matching
function for call to 'hash_value'"
return 0;
}
}}}
I have attached the full error log from clang.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7100#comment:3> 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:10 UTC