Back to home page

EIC code displayed by LXR

 
 

    


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

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___CXX03___ALGORITHM_RANGES_FILL_N_H
0010 #define _LIBCPP___CXX03___ALGORITHM_RANGES_FILL_N_H
0011 
0012 #include <__cxx03/__config>
0013 #include <__cxx03/__iterator/concepts.h>
0014 #include <__cxx03/__iterator/incrementable_traits.h>
0015 
0016 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0017 #  pragma GCC system_header
0018 #endif
0019 
0020 _LIBCPP_PUSH_MACROS
0021 #include <__cxx03/__undef_macros>
0022 
0023 #if _LIBCPP_STD_VER >= 20
0024 
0025 _LIBCPP_BEGIN_NAMESPACE_STD
0026 
0027 namespace ranges {
0028 namespace __fill_n {
0029 struct __fn {
0030   template <class _Type, output_iterator<const _Type&> _Iter>
0031   _LIBCPP_HIDE_FROM_ABI constexpr _Iter
0032   operator()(_Iter __first, iter_difference_t<_Iter> __n, const _Type& __value) const {
0033     for (; __n != 0; --__n) {
0034       *__first = __value;
0035       ++__first;
0036     }
0037     return __first;
0038   }
0039 };
0040 } // namespace __fill_n
0041 
0042 inline namespace __cpo {
0043 inline constexpr auto fill_n = __fill_n::__fn{};
0044 } // namespace __cpo
0045 } // namespace ranges
0046 
0047 _LIBCPP_END_NAMESPACE_STD
0048 
0049 #endif // _LIBCPP_STD_VER >= 20
0050 
0051 _LIBCPP_POP_MACROS
0052 
0053 #endif // _LIBCPP___CXX03___ALGORITHM_RANGES_FILL_N_H