
11 Jul
2012
11 Jul
'12
11:53 p.m.
Hi Marshall, Suppose we have an array int ar[5] = {1, 2, 2, 2, 2}; Then, `is_sorted_until(ar, ar + 5, std::less<int>())` should return `ar`'s end pointer. But it gives `ar + 2`. To fix this, change line 49 of is_sorted.hpp if ( !p ( *first, *next )) return next; to if ( p ( *next, *first )) return next; After fixing it, don't forget to change the predicate used in non-predicate version of is_sorted_until ;) Spotted by "clang-cxx11-r159746" test runner. Regards, Michel