ソースを参照

stl: std::less

skypjack 3 週間 前
コミット
de04de17b9
2 ファイル変更3 行追加2 行削除
  1. 2 2
      src/entt/core/algorithm.hpp
  2. 1 0
      src/entt/stl/functional.hpp

+ 2 - 2
src/entt/core/algorithm.hpp

@@ -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) {

+ 1 - 0
src/entt/stl/functional.hpp

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