1 // -*- C++ -*- 2 //===----------------------------------------------------------------------===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef _LIBCPP___ALGORITHM_IN_IN_RESULT_H 11 #define _LIBCPP___ALGORITHM_IN_IN_RESULT_H 12 13 #include <__concepts/convertible_to.h> 14 #include <__config> 15 #include <__utility/move.h> 16 17 _LIBCPP_BEGIN_NAMESPACE_STD 18 19 #ifndef _LIBCPP_HAS_NO_RANGES 20 21 namespace ranges { 22 template <class _I1, class _I2> 23 struct in_in_result { 24 [[no_unique_address]] _I1 in1; 25 [[no_unique_address]] _I2 in2; 26 27 template <class _II1, class _II2> 28 requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2> 29 _LIBCPP_HIDE_FROM_ABI constexpr 30 operator in_in_result<_II1, _II2>() const & { 31 return {in1, in2}; 32 } 33 34 template <class _II1, class _II2> 35 requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2> 36 _LIBCPP_HIDE_FROM_ABI constexpr 37 operator in_in_result<_II1, _II2>() && { return {_VSTD::move(in1), _VSTD::move(in2)}; } 38 }; 39 } // namespace ranges 40 41 #endif // _LIBCPP_HAS_NO_RANGES 42 43 _LIBCPP_END_NAMESPACE_STD 44 45 #endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H 46