Boost C++ Libraries: Ticket #2248: BLL constifies return values of operator* https://svn.boost.org/trac10/ticket/2248 <p> Hi, the problem can quickly described as </p> <pre class="wiki">( *_1 = 0 ) ( shared_ptr&lt;int&gt;(new int) ); // vs ( *_1 = 0) ( new int ); </pre><p> only the second line compiles. I tracked down the problem to boost/lambda/operator_return_type_traits.hpp:230. The BLL sets the return type of (const shared_ptr&lt;int&gt;)::operator*() to be const int&amp; rather than int&amp;. This is like turning int * const into int const *. I (and others) don't see a reason for this specialization, the code above works with the specialization removed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2248 Trac 1.4.3 Steven Watanabe Mon, 23 Feb 2009 16:06:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2248#comment:1 https://svn.boost.org/trac10/ticket/2248#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> Duplicates <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1572" title="#1572: Bugs: [lambda] smart pointer const-ness affects its contents (closed: fixed)">#1572</a>. </p> Ticket