stl: std::less

This commit is contained in:
skypjack
2026-04-21 08:15:17 +02:00
parent 4104c7db7b
commit de04de17b9
2 changed files with 3 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ struct std_sort {
* @param compare A valid comparison function object.
* @param args Arguments to forward to the sort function, if any.
*/
template<typename Compare = std::less<>, typename... Args>
template<typename Compare = stl::less<>, typename... Args>
void operator()(stl::random_access_iterator auto first, stl::random_access_iterator auto last, Compare compare = Compare{}, Args &&...args) const {
stl::sort(stl::forward<Args>(args)..., stl::move(first), stl::move(last), stl::move(compare));
}
@@ -50,7 +50,7 @@ struct insertion_sort {
* @param last An iterator past the last element of the range to sort.
* @param compare A valid comparison function object.
*/
template<typename Compare = std::less<>>
template<typename Compare = stl::less<>>
void operator()(stl::random_access_iterator auto first, stl::random_access_iterator auto last, Compare compare = Compare{}) const {
if(first < last) {
for(auto it = first + 1; it < last; ++it) {

View File

@@ -11,6 +11,7 @@ namespace entt::stl {
using std::equal_to;
using std::function;
using std::invoke;
using std::less;
} // namespace entt::stl