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