VCCC  2024.05
VisualCamp Common C++ library
indirect_equivalence_relation.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 1/26/24.
3 //
4 
5 #ifndef VCCC_ITERATOR_INDIRECT_EQUIVALENCE_RELATION_HPP
6 #define VCCC_ITERATOR_INDIRECT_EQUIVALENCE_RELATION_HPP
7 
8 #include <type_traits>
9 
17 
18 namespace vccc {
19 namespace detail {
20 
21 template<typename F, typename I1, typename I2>
22 struct indirect_equivalence_relation_impl_2
23  : conjunction<
24  equivalence_relation<F&, iter_value_t<I1>&, iter_value_t<I2>&>,
25  equivalence_relation<F&, iter_value_t<I1>&, iter_reference_t<I2>>,
26  equivalence_relation<F&, iter_reference_t<I1>, iter_value_t<I2>&>,
27  equivalence_relation<F&, iter_reference_t<I1>, iter_reference_t<I2>>,
28  equivalence_relation<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>
29  > {};
30 
31 template<typename F, typename I1, typename I2, bool = conjunction<
32  indirectly_readable<I1>,
33  indirectly_readable<I2>,
34  copy_constructible<F>
35 >::value /* true */>
36 struct indirect_equivalence_relation_impl_1 : indirect_equivalence_relation_impl_2<F, I1, I2> {};
37 template<typename F, typename I1, typename I2>
38 struct indirect_equivalence_relation_impl_1<F, I1, I2, false> : std::false_type {};
39 
40 } // namespace detail
41 
44 
45 template<typename F, typename I1, typename I2 = I1>
46 struct indirect_equivalence_relation : detail::indirect_equivalence_relation_impl_1<F, I1, I2> {};
47 
49 
50 } // namespace vccc
51 
52 #endif // VCCC_ITERATOR_INDIRECT_EQUIVALENCE_RELATION_HPP
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: indirect_equivalence_relation.hpp:46