tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
any_of.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_ANY_OF_HPP
4#define TETL_ALGORITHM_ANY_OF_HPP
5
7
8namespace etl {
9
12
14template <typename InputIt, typename Predicate>
15[[nodiscard]] constexpr auto any_of(InputIt first, InputIt last, Predicate p) -> bool
16{
17 return etl::find_if(first, last, p) != last;
18}
19
21
22} // namespace etl
23
24#endif // TETL_ALGORITHM_ANY_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 any_of(InputIt first, InputIt last, Predicate p) -> bool
Checks if unary predicate p returns true for at least one element in the range [first,...
Definition any_of.hpp:15
Definition adjacent_find.hpp:8