Path: blob/main/contrib/llvm-project/libcxx/include/__cxx03/__numeric/iota.h
213799 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___CXX03___NUMERIC_IOTA_H10#define _LIBCPP___CXX03___NUMERIC_IOTA_H1112#include <__cxx03/__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 void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) {22for (; __first != __last; ++__first, (void)++__value)23*__first = __value;24}2526_LIBCPP_END_NAMESPACE_STD2728#endif // _LIBCPP___CXX03___NUMERIC_IOTA_H293031