VCCC  2024.05
VisualCamp Common C++ library
sortable.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 1/26/24.
3 //
4 
5 #ifndef VCCC_ITERATOR_SORTABLE_HPP
6 #define VCCC_ITERATOR_SORTABLE_HPP
7 
8 #include <type_traits>
9 
16 
17 namespace vccc {
18 namespace detail {
19 
20 template<typename I, typename Comp, typename Proj,
21  bool = conjunction<
22  permutable<I>,
23  projectable<I, Proj>
24  >::value /* false */>
25 struct sortable_impl : std::false_type {};
26 
27 template<typename I, typename Comp, typename Proj>
28 struct sortable_impl<I, Comp, Proj, true>
29  : indirect_strict_weak_order<Comp, projected<I, Proj>> {};
30 
31 } // namespace detail
32 
35 
36 template<typename I, typename Comp = ranges::less, typename Proj = identity>
37 struct sortable : detail::sortable_impl<I, Comp, Proj> {};
38 
40 
41 } // namespace vccc
42 
43 #endif // VCCC_ITERATOR_SORTABLE_HPP
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: sortable.hpp:37