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_SET_UNION_H 10 #define _LIBCPP___ALGORITHM_RANGES_SET_UNION_H 11 12 #include <__algorithm/in_in_out_result.h> 13 #include <__algorithm/make_projected.h> 14 #include <__algorithm/set_union.h> 15 #include <__config> 16 #include <__functional/identity.h> 17 #include <__functional/invoke.h> 18 #include <__functional/ranges_operations.h> 19 #include <__iterator/concepts.h> 20 #include <__iterator/iterator_traits.h> 21 #include <__iterator/mergeable.h> 22 #include <__iterator/projected.h> 23 #include <__ranges/access.h> 24 #include <__ranges/concepts.h> 25 #include <__ranges/dangling.h> 26 #include <__utility/forward.h> 27 #include <__utility/move.h> 28 29 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 30 # pragma GCC system_header 31 #endif 32 33 #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 34 35 _LIBCPP_BEGIN_NAMESPACE_STD 36 37 namespace ranges { 38 39 template <class _InIter1, class _InIter2, class _OutIter> 40 using set_union_result = in_in_out_result<_InIter1, _InIter2, _OutIter>; 41 42 namespace __set_union { 43 44 struct __fn { 45 46 template <input_iterator _InIter1, sentinel_for<_InIter1> _Sent1, 47 input_iterator _InIter2, sentinel_for<_InIter2> _Sent2, 48 weakly_incrementable _OutIter, class _Comp = ranges::less, 49 class _Proj1 = identity, class _Proj2 = identity> 50 requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2> 51 _LIBCPP_HIDE_FROM_ABI constexpr 52 set_union_result<_InIter1, _InIter2, _OutIter> 53 operator()(_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Comp __comp = {}, 54 _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const { 55 // TODO: implement 56 (void)__first1; (void)__last1; (void)__first2; (void)__last2; (void)__result; (void)__comp; (void)__proj1; 57 (void)__proj2; 58 return {}; 59 } 60 61 template <input_range _Range1, input_range _Range2, weakly_incrementable _OutIter, 62 class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity> 63 requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2> 64 _LIBCPP_HIDE_FROM_ABI constexpr 65 set_union_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter> 66 operator()(_Range1&& __range1, _Range2&& __range2, _OutIter __result, _Comp __comp = {}, 67 _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const { 68 // TODO: implement 69 (void)__range1; (void)__range2; (void)__result; (void)__comp; (void)__proj1; (void)__proj2; 70 return {}; 71 } 72 73 }; 74 75 } // namespace __set_union 76 77 inline namespace __cpo { 78 inline constexpr auto set_union = __set_union::__fn{}; 79 } // namespace __cpo 80 } // namespace ranges 81 82 _LIBCPP_END_NAMESPACE_STD 83 84 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 85 86 #endif // _LIBCPP___ALGORITHM_RANGES_SET_UNION_H 87