1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM __project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H 10 #define _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H 11 12 #include <__algorithm/equal_range.h> 13 #include <__algorithm/make_projected.h> 14 #include <__config> 15 #include <__functional/identity.h> 16 #include <__functional/invoke.h> 17 #include <__functional/ranges_operations.h> 18 #include <__iterator/concepts.h> 19 #include <__iterator/iterator_traits.h> 20 #include <__iterator/projected.h> 21 #include <__ranges/access.h> 22 #include <__ranges/concepts.h> 23 #include <__ranges/dangling.h> 24 #include <__ranges/subrange.h> 25 #include <__utility/forward.h> 26 #include <__utility/move.h> 27 28 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 29 # pragma GCC system_header 30 #endif 31 32 #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 33 34 _LIBCPP_BEGIN_NAMESPACE_STD 35 36 namespace ranges { 37 namespace __equal_range { 38 39 struct __fn { 40 41 template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Tp, class _Proj = identity, 42 indirect_strict_weak_order<const _Tp*, projected<_Iter, _Proj>> _Comp = ranges::less> 43 _LIBCPP_HIDE_FROM_ABI constexpr 44 subrange<_Iter> operator()(_Iter __first, _Sent __last, const _Tp& __value, _Comp __comp = {}, 45 _Proj __proj = {}) const { 46 // TODO: implement 47 (void)__first; (void)__last; (void)__value; (void)__comp; (void)__proj; 48 return {}; 49 } 50 51 template <forward_range _Range, class _Tp, class _Proj = identity, 52 indirect_strict_weak_order<const _Tp*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> 53 _LIBCPP_HIDE_FROM_ABI constexpr 54 borrowed_subrange_t<_Range> operator()(_Range&& __range, const _Tp& __value, _Comp __comp = {}, 55 _Proj __proj = {}) const { 56 // TODO: implement 57 (void)__range; (void)__value; (void)__comp; (void)__proj; 58 return {}; 59 } 60 61 }; 62 63 } // namespace __equal_range 64 65 inline namespace __cpo { 66 inline constexpr auto equal_range = __equal_range::__fn{}; 67 } // namespace __cpo 68 } // namespace ranges 69 70 _LIBCPP_END_NAMESPACE_STD 71 72 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 73 74 #endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H 75