Path: blob/main/contrib/llvm-project/libcxx/include/__numeric/iota.h
35234 views
// -*- C++ -*-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-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___NUMERIC_IOTA_H10#define _LIBCPP___NUMERIC_IOTA_H1112#include <__config>1314#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)15# pragma GCC system_header16#endif1718_LIBCPP_BEGIN_NAMESPACE_STD1920template <class _ForwardIterator, class _Tp>21_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void22iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) {23for (; __first != __last; ++__first, (void)++__value)24*__first = __value;25}2627_LIBCPP_END_NAMESPACE_STD2829#endif // _LIBCPP___NUMERIC_IOTA_H303132