tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iota.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
#
ifndef
TETL_NUMERIC_IOTA_HPP
4
#
define
TETL_NUMERIC_IOTA_HPP
5
6
#
include
<
etl
/
_limits
/
numeric_limits
.
hpp
>
7
8
namespace
etl
{
9
10
/// \brief Fills the range [first, last) with sequentially increasing values,
11
/// starting with value and repetitively evaluating ++value.
12
/// \ingroup numeric
13
template
<
typename
ForwardIt,
typename
T>
14
constexpr
auto
iota
(ForwardIt first, ForwardIt last, T value) ->
void
15
{
16
while
(first != last) {
17
*first++ = value;
18
++value;
19
}
20
}
21
}
// namespace etl
22
23
#
endif
// TETL_NUMERIC_IOTA_HPP
etl::iota
constexpr auto iota(ForwardIt first, ForwardIt last, T value) -> void
Fills the range [first, last) with sequentially increasing values, starting with value and repetitive...
Definition
iota.hpp:14
etl
Definition
adjacent_find.hpp:9
include
etl
_numeric
iota.hpp
Generated on Sun Sep 7 2025 19:15:15 for tetl by
1.9.8