Opened 11 years ago
Closed 11 years ago
#6276 closed Bugs (invalid)
is_sorted() concept check fails in eval_if<>
Reported by: | JonT | Owned by: | Neil Groves |
---|---|---|---|
Milestone: | To Be Determined | Component: | range |
Version: | Boost Development Trunk | Severity: | Regression |
Keywords: | is_sorted eval_if | Cc: |
Description
The following worked in 1.38, but fails to compile in 1.45, 1.47 and head.
#include <vector> #include <algorithm> #include <boost/detail/algorithm.hpp> void testfunc() { std::vector<double> myVec(100); if (!boost::is_sorted(myVec.begin(),myVec.end()) ) { /* empty */ } }
The error log is attached.
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | boost-is-sorted-build.log added |
---|
comment:2 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 SinglePassRange concept.
Your code should read:
if (!boost::is_sorted(myVec)) { }
Note:
See TracTickets
for help on using tickets.
build log of compile errors