tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
fill.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_FILL_HPP
4#define TETL_ALGORITHM_FILL_HPP
5
6namespace etl {
7
10template <typename ForwardIt, typename T>
11constexpr auto fill(ForwardIt first, ForwardIt last, T const& value) -> void
12{
13 for (; first != last; ++first) {
14 *first = value;
15 }
16}
17
18} // namespace etl
19
20#endif // TETL_ALGORITHM_FILL_HPP
constexpr auto fill(ForwardIt first, ForwardIt last, T const &value) -> void
Assigns the given value to the elements in the range [first, last).
Definition fill.hpp:11
Definition adjacent_find.hpp:8