tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
find_if_not.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_FIND_IF_NOT_HPP
4#define TETL_ALGORITHM_FIND_IF_NOT_HPP
5
6namespace etl {
7
17template <typename InputIt, typename Predicate>
18[[nodiscard]] constexpr auto find_if_not(InputIt first, InputIt last, Predicate pred) noexcept -> InputIt
19{
20 for (; first != last; ++first) {
21 if (not pred(*first)) {
22 return first;
23 }
24 }
25 return last;
26}
27
28} // namespace etl
29
30#endif // TETL_ALGORITHM_FIND_IF_NOT_HPP
constexpr auto find_if_not(InputIt first, InputIt last, Predicate pred) noexcept -> InputIt
Searches for an element for which predicate q returns false.
Definition find_if_not.hpp:18
Definition adjacent_find.hpp:8