Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:08

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
0011 #define _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
0012 
0013 #include <__concepts/convertible_to.h>
0014 #include <__config>
0015 #include <__utility/move.h>
0016 
0017 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0018 #  pragma GCC system_header
0019 #endif
0020 
0021 _LIBCPP_PUSH_MACROS
0022 #include <__undef_macros>
0023 
0024 _LIBCPP_BEGIN_NAMESPACE_STD
0025 
0026 #if _LIBCPP_STD_VER >= 20
0027 
0028 namespace ranges {
0029 
0030 template <class _InIter1, class _InIter2, class _OutIter1>
0031 struct in_in_out_result {
0032   _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
0033   _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
0034   _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
0035 
0036   template <class _InIter3, class _InIter4, class _OutIter2>
0037     requires convertible_to<const _InIter1&, _InIter3> && convertible_to<const _InIter2&, _InIter4> &&
0038              convertible_to<const _OutIter1&, _OutIter2>
0039   _LIBCPP_HIDE_FROM_ABI constexpr operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() const& {
0040     return {in1, in2, out};
0041   }
0042 
0043   template <class _InIter3, class _InIter4, class _OutIter2>
0044     requires convertible_to<_InIter1, _InIter3> && convertible_to<_InIter2, _InIter4> &&
0045              convertible_to<_OutIter1, _OutIter2>
0046   _LIBCPP_HIDE_FROM_ABI constexpr operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() && {
0047     return {std::move(in1), std::move(in2), std::move(out)};
0048   }
0049 };
0050 
0051 } // namespace ranges
0052 
0053 #endif // _LIBCPP_STD_VER >= 20
0054 
0055 _LIBCPP_END_NAMESPACE_STD
0056 
0057 _LIBCPP_POP_MACROS
0058 
0059 #endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H