4#ifndef TETL_ALGORITHM_REPLACE_HPP
5#define TETL_ALGORITHM_REPLACE_HPP
7#include <etl/_algorithm/replace_if.hpp>
15template <
typename ForwardIt,
typename T>
16constexpr auto replace(ForwardIt first, ForwardIt last, T
const& oldValue, T
const& newValue) ->
void
18 auto predicate = [&oldValue](
auto const& item) {
return item == oldValue; };
19 etl::replace_if(first, last, predicate, newValue);
constexpr auto replace(ForwardIt first, ForwardIt last, T const &oldValue, T const &newValue) -> void
Replaces all elements satisfying specific criteria with new_value in the range [first,...
Definition replace.hpp:16
Definition adjacent_find.hpp:9