tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
remove.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_REMOVE_HPP
4#define TETL_ALGORITHM_REMOVE_HPP
5
7
8namespace etl {
9
14template <typename ForwardIt, typename T>
15[[nodiscard]] constexpr auto remove(ForwardIt first, ForwardIt last, T const& value) -> ForwardIt
16{
17 return etl::remove_if(first, last, [&value](auto const& item) { return item == value; });
18}
19
20} // namespace etl
21
22#endif // TETL_ALGORITHM_REMOVE_HPP
constexpr auto remove(ForwardIt first, ForwardIt last, T const &value) -> ForwardIt
Removes all elements satisfying specific criteria from the range [first, last) and returns a past-the...
Definition remove.hpp:15
constexpr auto remove_if(ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt
Removes all elements satisfying specific criteria from the range [first, last) and returns a past-the...
Definition remove_if.hpp:16
Definition adjacent_find.hpp:8