Boost C++ Libraries: Ticket #5556: Compilation error in boost::range with GCC 4.5 https://svn.boost.org/trac10/ticket/5556 <p> The following code: </p> <pre class="wiki">#include &lt;boost/range/algorithm.hpp&gt; #include &lt;boost/range/algorithm_ext.hpp&gt; int main() { return 0; } </pre><p> produces the following compilation error: </p> <pre class="wiki">$ g++ main.cpp In file included from boost/range/algorithm_ext.hpp:20:0, from cppmain.cpp:2: boost/range/algorithm_ext/is_sorted.hpp: In function 'bool boost::range::is_sorted(const SinglePassRange&amp;)': boost/range/algorithm_ext/is_sorted.hpp:55:12: error: 'is_sorted' is not a member of 'boost::range::range_detail' </pre><p> Note that changing include order makes the error go away. I believe it's due to a fact that one of the headers included by <code>&lt;boost/range/algorithm.hpp&gt;</code> defines a <code>boost::range::range_detail</code> namespace, which is then looked up for <code>is_sorted</code> implementation that is not there. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5556 Trac 1.4.3 Neil Groves Sun, 22 May 2011 20:16:15 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5556#comment:1 https://svn.boost.org/trac10/ticket/5556#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">fixed</span> </li> </ul> <p> resolved on trunk by 'wash' </p> Ticket