VCCC  2024.05
VisualCamp Common C++ library
in_in_result.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 1/25/24.
3 //
4 
5 #ifndef VCCC_ALGORITHM_IN_IN_RESULT_HPP
6 #define VCCC_ALGORITHM_IN_IN_RESULT_HPP
7 
8 #include <type_traits>
9 #include <utility>
10 
14 
15 namespace vccc {
16 namespace ranges {
17 
20 
21 template<typename I1, typename I2>
22 struct in_in_result {
25 
26  template<typename II1, typename II2, std::enable_if_t<conjunction<
29  >::value, int> = 0>
30  constexpr operator in_in_result<I2, II2>() const & {
31  return {in1, in2};
32  }
33 
34  template<typename II1, typename II2, std::enable_if_t<conjunction<
37  >::value, int> = 0>
38  constexpr operator in_in_result<I2, II2>() && {
39  return {std::move(in1), std::move(in2)};
40  }
41 };
42 
44 
45 } // namespace ranges
46 } // namespace vccc
47 
48 #endif // VCCC_ALGORITHM_RANGES_IN_IN_RESULT_HPP
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
#define VCCC_NO_UNIQUE_ADDRESS
Definition: no_unique_address.hpp:9
Definition: conjunction.hpp:22
Models std::convertible_to
Definition: convertible_to.hpp:38
Definition: in_in_result.hpp:22
VCCC_NO_UNIQUE_ADDRESS I2 in2
Definition: in_in_result.hpp:24
VCCC_NO_UNIQUE_ADDRESS I1 in1
Definition: in_in_result.hpp:23