tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
remove_copy_if.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ALGORITHM_REMOVE_COPY_IF_HPP
4
#define TETL_ALGORITHM_REMOVE_COPY_IF_HPP
5
6
namespace
etl
{
7
14
template
<
typename
InputIt,
typename
OutputIt,
typename
Predicate>
15
constexpr
auto
remove_copy_if
(InputIt first, InputIt last, OutputIt destination, Predicate p) -> OutputIt
16
{
17
for
(; first != last; ++first, (void)++destination) {
18
if
(not p(*first)) {
19
*destination = *first;
20
}
21
}
22
23
return
destination;
24
}
25
26
}
// namespace etl
27
28
#endif
// TETL_ALGORITHM_REMOVE_COPY_IF_HPP
etl::remove_copy_if
constexpr auto remove_copy_if(InputIt first, InputIt last, OutputIt destination, Predicate p) -> OutputIt
Copies elements from the range [first, last), to another range beginning at destination,...
Definition
remove_copy_if.hpp:15
etl
Definition
adjacent_find.hpp:8
include
etl
_algorithm
remove_copy_if.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0