Boost C++ Libraries: Ticket #7025: circular buffer reports warning: " type qualifiers ignored on function return type" while compile. https://svn.boost.org/trac10/ticket/7025 <p> If using circular in my application, GCC will report warning as: </p> <pre class="wiki">../../../packages/target/libboost_1_49_0/include/boost/circular_buffer/base.hpp:386: warning: type qualifiers ignored on function return type ../../../packages/target/libboost_1_49_0/include/boost/circular_buffer/base.hpp:424: warning: type qualifiers ignored on function return type ../../../packages/target/libboost_1_49_0/include/boost/circular_buffer/base.hpp:478: warning: type qualifiers ignored on function return type ../../../packages/target/libboost_1_49_0/include/boost/circular_buffer/base.hpp:496: warning: type qualifiers ignored on function return type </pre><p> I think it's caused by the "const" decorator. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7025 Trac 1.4.3 viboes Tue, 21 May 2013 18:12:00 GMT description changed https://svn.boost.org/trac10/ticket/7025#comment:1 https://svn.boost.org/trac10/ticket/7025#comment:1 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/7025?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket viboes Tue, 21 May 2013 18:12:48 GMT owner, status changed https://svn.boost.org/trac10/ticket/7025#comment:2 https://svn.boost.org/trac10/ticket/7025#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Jan Gaspar</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sun, 09 Jun 2013 20:42:53 GMT component changed https://svn.boost.org/trac10/ticket/7025#comment:3 https://svn.boost.org/trac10/ticket/7025#comment:3 <ul> <li><strong>component</strong> <span class="trac-field-old">circular_buffer</span> → <span class="trac-field-new">call_traits</span> </li> </ul> <p> I suspect that this need a change in boost/detail/call_traits.hpp </p> <p> The following </p> <pre class="wiki">template &lt;typename T&gt; struct ct_imp2&lt;T, true&gt; { typedef const T param_type; }; </pre><p> should be </p> <pre class="wiki">template &lt;typename T&gt; struct ct_imp2&lt;T, true&gt; { typedef T param_type; }; </pre> Ticket viboes Sun, 09 Jun 2013 20:44:07 GMT owner, status changed https://svn.boost.org/trac10/ticket/7025#comment:4 https://svn.boost.org/trac10/ticket/7025#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">viboes</span> to <span class="trac-author">John Maddock</span> </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket John Maddock Thu, 13 Jun 2013 15:39:50 GMT owner changed https://svn.boost.org/trac10/ticket/7025#comment:5 https://svn.boost.org/trac10/ticket/7025#comment:5 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">viboes</span> </li> </ul> <p> I'm unable to reproduce here - anyone have a test case? </p> <p> In any case, circular_buffer is abusing call_traits::param_type which is designed for parameters and <em>not</em> return values. And yes it really should be const ;-) </p> <p> Use call_traits::value_type or call_traits::const_reference for those return types (I think I would settle for the latter). </p> Ticket viboes Sun, 07 Jul 2013 10:33:49 GMT component changed https://svn.boost.org/trac10/ticket/7025#comment:6 https://svn.boost.org/trac10/ticket/7025#comment:6 <ul> <li><strong>component</strong> <span class="trac-field-old">call_traits</span> → <span class="trac-field-new">circular_buffer</span> </li> </ul> <p> You are right. As the documentation states, the return type should be const_reference. </p> Ticket viboes Sun, 07 Jul 2013 13:01:34 GMT milestone changed https://svn.boost.org/trac10/ticket/7025#comment:7 https://svn.boost.org/trac10/ticket/7025#comment:7 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.55.0</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/84971" title="CircularBuffer: manage with #5362, #7025, #7050.">[84971]</a>. </p> Ticket viboes Tue, 10 Sep 2013 22:14:35 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7025#comment:8 https://svn.boost.org/trac10/ticket/7025#comment:8 <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">fixed</span> </li> </ul> Ticket