tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
none_of.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_NONE_OF_HPP
4#define TETL_ALGORITHM_NONE_OF_HPP
5
7
8namespace etl {
9
12template <typename InputIt, typename Predicate>
13[[nodiscard]] constexpr auto none_of(InputIt first, InputIt last, Predicate p) -> bool
14{
15 return etl::find_if(first, last, p) == last;
16}
17
18} // namespace etl
19
20#endif // TETL_ALGORITHM_NONE_OF_HPP
constexpr auto find_if(InputIt first, InputIt last, Predicate pred) noexcept -> InputIt
Searches for an element for which predicate p returns true.
Definition find_if.hpp:18
constexpr auto none_of(InputIt first, InputIt last, Predicate p) -> bool
Checks if unary predicate p returns true for no elements in the range [first, last).
Definition none_of.hpp:13
Definition adjacent_find.hpp:8