Boost C++ Libraries: Ticket #7204: boost1.50 unorder_map not affect shared_ptr object reference count on mac 10.8 https://svn.boost.org/trac10/ticket/7204 <p> here is the test code: </p> <p> #include &lt;iostream&gt; using namespace std; </p> <p> #include &lt;boost/smart_ptr.hpp&gt; #include &lt;boost/unordered_map.hpp&gt; </p> <p> typedef unsigned long long ulonglong; </p> <p> class test { </p> <blockquote> <p> int a; </p> </blockquote> <p> public: </p> <blockquote> <p> test(int i) : a(i) {} ~test() {} </p> </blockquote> <p> }; </p> <p> int main(int argc, const char * argv[]) { </p> <blockquote> <p> boost::unordered_map&lt;ulonglong, boost::shared_ptr&lt;test&gt; &gt; tt; boost::shared_ptr&lt;test&gt; e(new test(3)); tt.insert(make_pair(1314, e)); return 0; </p> </blockquote> <p> } </p> <p> I'm developing program under mac 10.8 with Xcode 4.4 . When using unordered_map with upper codes, boost150 will not add reference count of var e, but boost 149 works fine. </p> <p> When doing this test, I switch the include header folder of /usr/local/include/boost betweet boost150 and boost 149. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7204 Trac 1.4.3 Daniel James Wed, 08 Aug 2012 04:39:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7204#comment:1 https://svn.boost.org/trac10/ticket/7204#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7100" title="#7100: Bugs: unorderd_set&lt;shared_ptr&lt;T&gt; &gt; &gt; - insert does not increment count (closed: fixed)">#7100</a> (and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7205" title="#7205: Bugs: boost1.50 unorder_map not affect shared_ptr object reference count on ... (closed: duplicate)">#7205</a>). </p> Ticket