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
6
7namespace etl {
8
12template <typename ForwardIt, typename T>
13constexpr 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
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
Definition adjacent_find.hpp:8