Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===----------------------------------------------------------------------===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
0010 #define _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
0011 
0012 #include <__algorithm/includes.h>
0013 #include <__algorithm/make_projected.h>
0014 #include <__config>
0015 #include <__functional/identity.h>
0016 #include <__functional/invoke.h>
0017 #include <__functional/ranges_operations.h>
0018 #include <__iterator/concepts.h>
0019 #include <__iterator/iterator_traits.h>
0020 #include <__iterator/projected.h>
0021 #include <__ranges/access.h>
0022 #include <__ranges/concepts.h>
0023 #include <__utility/forward.h>
0024 #include <__utility/move.h>
0025 
0026 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0027 #  pragma GCC system_header
0028 #endif
0029 
0030 _LIBCPP_PUSH_MACROS
0031 #include <__undef_macros>
0032 
0033 #if _LIBCPP_STD_VER >= 20
0034 
0035 _LIBCPP_BEGIN_NAMESPACE_STD
0036 
0037 namespace ranges {
0038 struct __includes {
0039   template <input_iterator _Iter1,
0040             sentinel_for<_Iter1> _Sent1,
0041             input_iterator _Iter2,
0042             sentinel_for<_Iter2> _Sent2,
0043             class _Proj1                                                                           = identity,
0044             class _Proj2                                                                           = identity,
0045             indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
0046   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
0047       _Iter1 __first1,
0048       _Sent1 __last1,
0049       _Iter2 __first2,
0050       _Sent2 __last2,
0051       _Comp __comp   = {},
0052       _Proj1 __proj1 = {},
0053       _Proj2 __proj2 = {}) const {
0054     return std::__includes(
0055         std::move(__first1),
0056         std::move(__last1),
0057         std::move(__first2),
0058         std::move(__last2),
0059         std::move(__comp),
0060         std::move(__proj1),
0061         std::move(__proj2));
0062   }
0063 
0064   template <input_range _Range1,
0065             input_range _Range2,
0066             class _Proj1 = identity,
0067             class _Proj2 = identity,
0068             indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>
0069                 _Comp = ranges::less>
0070   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
0071       _Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
0072     return std::__includes(
0073         ranges::begin(__range1),
0074         ranges::end(__range1),
0075         ranges::begin(__range2),
0076         ranges::end(__range2),
0077         std::move(__comp),
0078         std::move(__proj1),
0079         std::move(__proj2));
0080   }
0081 };
0082 
0083 inline namespace __cpo {
0084 inline constexpr auto includes = __includes{};
0085 } // namespace __cpo
0086 } // namespace ranges
0087 
0088 _LIBCPP_END_NAMESPACE_STD
0089 
0090 #endif // _LIBCPP_STD_VER >= 20
0091 
0092 _LIBCPP_POP_MACROS
0093 
0094 #endif // _LIBCPP___ALGORITHM_RANGES_INCLUDES_H