Boost C++ Libraries: Ticket #6276: is_sorted() concept check fails in eval_if<> https://svn.boost.org/trac10/ticket/6276 <p> The following worked in 1.38, but fails to compile in 1.45, 1.47 and head. </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;vector&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;algorithm&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/detail/algorithm.hpp&gt;</span><span class="cp"></span> <span class="kt">void</span> <span class="nf">testfunc</span><span class="p">()</span> <span class="p">{</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span> <span class="n">myVec</span><span class="p">(</span><span class="mi">100</span><span class="p">);</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">boost</span><span class="o">::</span><span class="n">is_sorted</span><span class="p">(</span><span class="n">myVec</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="n">myVec</span><span class="p">.</span><span class="n">end</span><span class="p">())</span> <span class="p">)</span> <span class="p">{</span> <span class="cm">/* empty */</span> <span class="p">}</span> <span class="p">}</span> </pre></div></div><p> The error log is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6276 Trac 1.4.3 JonT <jon@…> Fri, 16 Dec 2011 02:18:33 GMT attachment set https://svn.boost.org/trac10/ticket/6276 https://svn.boost.org/trac10/ticket/6276 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-is-sorted-build.log</span> </li> </ul> <p> build log of compile errors </p> Ticket JonT <jon@…> Fri, 16 Dec 2011 02:31:02 GMT <link>https://svn.boost.org/trac10/ticket/6276#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6276#comment:1</guid> <description> <p> Test case compiles in 1.42 but not 1.43 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sun, 15 Apr 2012 12:37:32 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6276#comment:2 https://svn.boost.org/trac10/ticket/6276#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">invalid</span> </li> </ul> <p> This isn't a defect. The compile-log shows a reasonably clear indication that iterators are being based in to an algorithm that requires a model of the <a class="missing wiki">SinglePassRange</a> concept. </p> <p> Your code should read: </p> <p> if (!boost::is_sorted(myVec)) { } </p> Ticket