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_GENERATE_N_H 10 #define _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H 11 12 #include <__algorithm/generate_n.h> 13 #include <__algorithm/make_projected.h> 14 #include <__concepts/constructible.h> 15 #include <__concepts/invocable.h> 16 #include <__config> 17 #include <__functional/identity.h> 18 #include <__functional/invoke.h> 19 #include <__functional/ranges_operations.h> 20 #include <__iterator/concepts.h> 21 #include <__iterator/incrementable_traits.h> 22 #include <__iterator/iterator_traits.h> 23 #include <__iterator/projected.h> 24 #include <__ranges/access.h> 25 #include <__ranges/concepts.h> 26 #include <__ranges/dangling.h> 27 #include <__utility/forward.h> 28 #include <__utility/move.h> 29 30 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 31 # pragma GCC system_header 32 #endif 33 34 #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 35 36 _LIBCPP_BEGIN_NAMESPACE_STD 37 38 namespace ranges { 39 namespace __generate_n { 40 41 struct __fn { 42 43 template <input_or_output_iterator _OutIter, copy_constructible _Func> 44 requires invocable<_Func&> && indirectly_writable<_OutIter, invoke_result_t<_Func&>> 45 _LIBCPP_HIDE_FROM_ABI constexpr 46 _OutIter operator()(_OutIter __first, iter_difference_t<_OutIter> __n, _Func __gen) const { 47 // TODO: implement 48 (void)__first; (void)__n; (void)__gen; 49 return {}; 50 } 51 52 }; 53 54 } // namespace __generate_n 55 56 inline namespace __cpo { 57 inline constexpr auto generate_n = __generate_n::__fn{}; 58 } // namespace __cpo 59 } // namespace ranges 60 61 _LIBCPP_END_NAMESPACE_STD 62 63 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) 64 65 #endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H 66