sandbox
Loading...
Searching...
No Matches
algorithm.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_UTILITY_ALGORITHM_HPP_
3#define LIBSBX_UTILITY_ALGORITHM_HPP_
4
5#include <type_traits>
6#include <utility>
7#include <iterator>
8#include <algorithm>
9#include <concepts>
10
11namespace sbx::utility {
12
13struct std_sort {
14
15 template<std::random_access_iterator Iterator, std::sentinel_for<Iterator> Sentinel, typename Compare = std::less<>, typename... Args>
16 auto operator()(Iterator first, Sentinel last, Compare compare = Compare{}, Args&&... args) const -> void {
17 std::sort(std::forward<Args>(args)..., std::move(first), std::move(last), std::move(compare));
18 }
19
20}; // struct std_sort
21
22} // namespace sbx::utility
23
24#endif // LIBSBX_UTILITY_ALGORITHM_HPP_
Definition: algorithm.hpp:13