Back to home page

EIC code displayed by LXR

 
 

    


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

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___CXX03___ALGORITHM_IN_FOUND_RESULT_H
0011 #define _LIBCPP___CXX03___ALGORITHM_IN_FOUND_RESULT_H
0012 
0013 #include <__cxx03/__concepts/convertible_to.h>
0014 #include <__cxx03/__config>
0015 #include <__cxx03/__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 <__cxx03/__undef_macros>
0023 
0024 #if _LIBCPP_STD_VER >= 20
0025 
0026 _LIBCPP_BEGIN_NAMESPACE_STD
0027 
0028 namespace ranges {
0029 template <class _InIter1>
0030 struct in_found_result {
0031   _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
0032   bool found;
0033 
0034   template <class _InIter2>
0035     requires convertible_to<const _InIter1&, _InIter2>
0036   _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const& {
0037     return {in, found};
0038   }
0039 
0040   template <class _InIter2>
0041     requires convertible_to<_InIter1, _InIter2>
0042   _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() && {
0043     return {std::move(in), found};
0044   }
0045 };
0046 } // namespace ranges
0047 
0048 _LIBCPP_END_NAMESPACE_STD
0049 
0050 #endif // _LIBCPP_STD_VER >= 20
0051 
0052 _LIBCPP_POP_MACROS
0053 
0054 #endif // _LIBCPP___CXX03___ALGORITHM_IN_FOUND_RESULT_H