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
#ifndef TETL_NUMERIC_IOTA_HPP
3
#define TETL_NUMERIC_IOTA_HPP
4
5
#include <
etl/_limits/numeric_limits.hpp
>
6
7
namespace
etl
{
8
12
template
<
typename
ForwardIt,
typename
T>
13
constexpr
auto
iota
(ForwardIt first, ForwardIt last, T value) ->
void
14
{
15
while
(first != last) {
16
*first++ = value;
17
++value;
18
}
19
}
20
}
// namespace etl
21
22
#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:13
etl
Definition
adjacent_find.hpp:8
numeric_limits.hpp
include
etl
_numeric
iota.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0