VCCC  2024.05
VisualCamp Common C++ library
partially_ordered_with.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/25.
3 //
4 
5 #ifndef VCCC_CONCEPTS_PARTIALLY_ORDERED_WITH_HPP_
6 #define VCCC_CONCEPTS_PARTIALLY_ORDERED_WITH_HPP_
7 
8 #include <type_traits>
9 
15 
16 namespace vccc {
17 namespace detail {
18 
19 template<typename T, typename U, bool = conjunction<is_referencable<T>, is_referencable<U>>::value>
20 struct partially_ordered_with_impl : std::false_type {};
21 template<typename T, typename U>
22 struct partially_ordered_with_impl<T, U, true>
23  : conjunction<
24  implicit_expression_check<rel_ops::is_less_than_comparable, const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
25  implicit_expression_check<rel_ops::is_less_equal_than_comparable, const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
26  implicit_expression_check<rel_ops::is_greater_than_comparable, const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
27  implicit_expression_check<rel_ops::is_greater_equal_than_comparable, const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
28  implicit_expression_check<rel_ops::is_less_than_comparable, const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >,
29  implicit_expression_check<rel_ops::is_less_equal_than_comparable, const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >,
30  implicit_expression_check<rel_ops::is_greater_than_comparable, const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >,
31  implicit_expression_check<rel_ops::is_greater_equal_than_comparable, const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >
32  > {};
33 
34 } // namespace detail
35 
38 
44 template<typename T, typename U>
45 struct partially_ordered_with : detail::partially_ordered_with_impl<T, U> {};
46 
48 
49 } // namespace vccc
50 
51 #endif // VCCC_CONCEPTS_PARTIALLY_ORDERED_WITH_HPP_
Definition: directory.h:12
Definition: partially_ordered_with.hpp:45