VCCC  2024.05
VisualCamp Common C++ library
in_found_result.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 1/25/24.
3 //
4 
5 #ifndef VCCC_ALGORITHM_RANGES_IN_FOUND_RESULT_HPP
6 #define VCCC_ALGORITHM_RANGES_IN_FOUND_RESULT_HPP
7 
8 #include <type_traits>
9 #include <utility>
10 
13 
14 namespace vccc {
15 namespace ranges {
16 
19 
20 template<typename I>
24 
25  template<typename I2, std::enable_if_t<
27  constexpr operator in_found_result<I2>() const & {
28  return {in, found};
29  }
30 
31  template<typename I2, std::enable_if_t<
33  constexpr operator in_found_result<I2>() && {
34  return {std::move(in), found};
35  }
36 };
37 
39 
40 } // namespace ranges
41 } // namespace vccc
42 
43 #endif // VCCC_ALGORITHM_RANGES_IN_FOUND_RESULT_HPP
Definition: directory.h:12
#define VCCC_NO_UNIQUE_ADDRESS
Definition: no_unique_address.hpp:9
Models std::convertible_to
Definition: convertible_to.hpp:38
Definition: in_found_result.hpp:21
VCCC_NO_UNIQUE_ADDRESS I in
Definition: in_found_result.hpp:22
VCCC_NO_UNIQUE_ADDRESS bool found
Definition: in_found_result.hpp:23