Boost C++ Libraries: Ticket #5701: lexertl token_value_type returns const unused for nonconst ref https://svn.boost.org/trac10/ticket/5701 <p> Compiling the following source file creates an error with clang (trunk version): </p> <pre class="wiki">#include &lt;boost/spirit/include/lex_lexertl.hpp&gt; </pre><p> The error (I think clang is right not to accept this code) is: </p> <pre class="wiki">In file included from bug_unused_const.cpp:1: In file included from /var/lib/buildbot/instdirs/boost-trunk/include/boost/spirit/include/lex_lexertl.hpp:16: In file included from /var/lib/buildbot/instdirs/boost-trunk/include/boost/spirit/home/lex/lexer_lexertl.hpp:16: In file included from /var/lib/buildbot/instdirs/boost-trunk/include/boost/spirit/home/lex/lexer/lexertl/lexer.hpp:20: /var/lib/buildbot/instdirs/boost-trunk/include/boost/spirit/home/lex/lexer/lexertl/token.hpp:143:44: error: binding of reference to type 'token_value_type' (aka 'boost::spirit::unused_type' ) to a value of type 'const boost::spirit::unused_type' drops qualifiers token_value_type&amp; value() { return unused; } ^~~~~~ </pre><p> The token_value_type return value is a nonconst unused_type, whereas unused is a const object of unused_type. </p> <p> This is true both in trunk and release branch. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5701 Trac 1.4.3 Joel de Guzman Fri, 15 Jul 2011 14:21:18 GMT owner changed https://svn.boost.org/trac10/ticket/5701#comment:1 https://svn.boost.org/trac10/ticket/5701#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Joel de Guzman</span> to <span class="trac-author">Hartmut Kaiser</span> </li> </ul> Ticket Hartmut Kaiser Fri, 15 Jul 2011 17:53:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5701#comment:2 https://svn.boost.org/trac10/ticket/5701#comment:2 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/73122" title="Spirit: fixed #5701: lexertl token_value_type returns const unused for ...">[73122]</a>) Spirit: fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5701" title="#5701: Bugs: lexertl token_value_type returns const unused for nonconst ref (closed: fixed)">#5701</a>: lexertl token_value_type returns const unused for nonconst ref </p> Ticket