VCCC  2024.05
VisualCamp Common C++ library
weakly_equality_comparable_with.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_CONCEPTS_WEAKLY_EQUALITY_COMPARABLE_WITH_HPP_
6 #define VCCC_CONCEPTS_WEAKLY_EQUALITY_COMPARABLE_WITH_HPP_
7 
8 #include <type_traits>
9 
14 
15 namespace vccc {
16 namespace detail {
17 
18 template<
19  typename T,
20  typename U,
21  bool = conjunction<
22  is_referencable<std::remove_reference_t<T>>,
23  is_referencable<std::remove_reference_t<U>>
24  >::value
25 >
26 struct weakly_equality_comparable_with_impl : std::false_type {};
27 
28 template<typename T, typename U>
29 struct weakly_equality_comparable_with_impl<T, U, true>
30  : conjunction<
31  rel_ops::is_equality_comparable<const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
32  rel_ops::is_equality_comparable<const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >,
33  rel_ops::is_non_equality_comparable<const std::remove_reference_t<T>&, const std::remove_reference_t<U>& >,
34  rel_ops::is_non_equality_comparable<const std::remove_reference_t<U>&, const std::remove_reference_t<T>& >
35  > {};
36 
37 } // namespace detail
38 
41 
50 template<typename T, typename U>
51 struct weakly_equality_comparable_with : detail::weakly_equality_comparable_with_impl<T, U> {};
52 
54 
55 } // namespace vccc
56 
57 #endif // VCCC_CONCEPTS_WEAKLY_EQUALITY_COMPARABLE_WITH_HPP_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies that two different objects can be compared for equality with each other (in either order) u...
Definition: weakly_equality_comparable_with.hpp:51