Boost C++ Libraries: Ticket #8693: gcc -Wcast-qual warning in boost/range/algorithm_ext/push_back.hpp https://svn.boost.org/trac10/ticket/8693 <p> When trying boost range library with -Wcast-qual and -Werror flags enabled the following error comes up boost/range/algorithm_ext/push_back.hpp:30:18: error: </p> <blockquote> <p> cast from type 'const Range*' to type 'void*' casts away qualifiers [-Werror=cast-qual] BOOST_ASSERT( (void*)&amp;on != (void*)&amp;from &amp;&amp; ..... </p> </blockquote> <p> &amp;from is a pointer to const object so the C-style cast (void*)&amp;from casts away of constness. I think this can be fixed by replacing C-style cast by const_cast&lt;void*&gt;(static_cast&lt;const void*&gt;(&amp;from)) or by adding GCC pragmas to disable -Wcast-qual warning in this header file </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8693 Trac 1.4.3 Ruben Adamyan <ruboam@…> Thu, 13 Jun 2013 16:44:42 GMT severity changed https://svn.boost.org/trac10/ticket/8693#comment:1 https://svn.boost.org/trac10/ticket/8693#comment:1 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Cosmetic</span> </li> </ul> Ticket Neil Groves Wed, 26 Feb 2014 22:02:50 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8693#comment:2 https://svn.boost.org/trac10/ticket/8693#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> Ticket