tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
for_each.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ALGORITHM_FOR_EACH_HPP
4
#define TETL_ALGORITHM_FOR_EACH_HPP
5
6
namespace
etl
{
7
19
template
<
typename
InputIt,
typename
UnaryFunc>
20
constexpr
auto
for_each
(InputIt first, InputIt last, UnaryFunc f)
noexcept
-> UnaryFunc
21
{
22
for
(; first != last; ++first) {
23
f(*first);
24
}
25
return
f;
26
}
27
28
}
// namespace etl
29
30
#endif
// TETL_ALGORITHM_FOR_EACH_HPP
etl::for_each
constexpr auto for_each(InputIt first, InputIt last, UnaryFunc f) noexcept -> UnaryFunc
Applies the given function object f to the result of dereferencing every iterator in the range [first...
Definition
for_each.hpp:20
etl
Definition
adjacent_find.hpp:8
include
etl
_algorithm
for_each.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0