Boost C++ Libraries: Ticket #3878: "ptr_map<T>::auto_type const" acts like "std::auto_ptr<T const>" instead of "std::auto_ptr<T> const" https://svn.boost.org/trac10/ticket/3878 <p> the ptr_map&lt;T&gt;::auto_type doesn't act quite as much like std::auto_ptr&lt;T&gt; as the documentation declares. The reason is that it seems to follow container const semantics instead of pointer const semantics. Namely, "ptr_map&lt;T&gt;::auto_type const" acts more like "std::auto_ptr&lt;T const&gt;" instead of "std::auto_ptr&lt;T&gt; const". In reading the documentation I would have expected the latter instead of the former treatment of const on this type. </p> <p> It should be considered which is the appropriate way to handle const for this type. If the existing behavior is desired then a note should be added to the documentation. If instead const pointer semantics are desirable then changing the code should be considered. </p> <p> This may apply to other pointer containers as well, I haven't investigated this. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3878 Trac 1.4.3 Thorsten Ottosen Thu, 31 Mar 2011 20:38:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3878#comment:1 https://svn.boost.org/trac10/ticket/3878#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">wontfix</span> </li> </ul> <p> The current behavior the desired bahavior to preserve const-correctness. In a future version, const overloads can return boost::move_ptr&lt;const T&gt;. </p> <p> -Thorsten </p> Ticket ryan.gallagher@… Thu, 31 Mar 2011 20:48:24 GMT <link>https://svn.boost.org/trac10/ticket/3878#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3878#comment:2</guid> <description> <p> Any chance of getting a note in the documentation on this then? </p> <p> -Ryan </p> </description> <category>Ticket</category> </item> </channel> </rss>