Boost C++ Libraries: Ticket #1421: ptr_map reference type is not a reference https://svn.boost.org/trac10/ticket/1421 <p> The "reference" typedef in ptr_map and also ptr_multimap is not defined as a reference. This can be easily demonstrated with the following code: </p> <pre class="wiki">typedef std::map&lt;int,int*&gt; STDCTR; typedef boost::ptr_map&lt;int,int&gt; PTRCTR; bool isrefstdit = boost::is_reference&lt;STDCTR::iterator::reference&gt;::value; bool isrefstdval = boost::is_reference&lt;STDCTR::reference&gt;::value; bool isrefptrit = boost::is_reference&lt;PTRCTR::iterator::reference&gt;::value; bool isrefptrval = boost::is_reference&lt;PTRCTR::reference&gt;::value; </pre><p> is_reference returns true for std::map, but false for boost::ptr_map. This was correct in v1.33.1, but is not in v1.34.1. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1421 Trac 1.4.3 Thorsten Ottosen Sat, 17 Nov 2007 21:07:42 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1421#comment:1 https://svn.boost.org/trac10/ticket/1421#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">invalid</span> </li> </ul> <p> This cannot be achieved with the current design because the reference type is a proxy object. </p> <p> -Thorsten </p> Ticket