diff --git a/sorted.hpp b/sorted.hpp index b9a03560..3fc4767d 100644 --- a/sorted.hpp +++ b/sorted.hpp @@ -42,8 +42,8 @@ class iter::impl::SortedView { // sort by comparing the elements that the iterators point to std::sort(std::begin(sorted_iters.get()), std::end(sorted_iters.get()), - [compare_func](iterator_type& it1, - iterator_type& it2) { + [compare_func](iterator_type it1, + iterator_type it2) { return compare_func(*it1, *it2); }); } @@ -69,8 +69,7 @@ iter::impl::SortedView iter::sorted( namespace iter { template auto sorted(Container&& container) { - return sorted(std::forward(container), - std::less>()); + return sorted(std::forward(container), std::less<>{}); } }