Back to home page

EIC code displayed by LXR

 
 

    


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

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