tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
partition_point.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ALGORITHM_PARTITION_POINT_HPP
4
#define TETL_ALGORITHM_PARTITION_POINT_HPP
5
6
namespace
etl
{
7
12
template
<
typename
ForwardIt,
typename
Predicate>
13
[[nodiscard]]
constexpr
auto
partition_point
(ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt
14
{
15
for
(; first != last; ++first) {
16
if
(not p(*first)) {
17
break
;
18
}
19
}
20
21
return
first;
22
}
23
24
}
// namespace etl
25
26
#endif
// TETL_ALGORITHM_PARTITION_POINT_HPP
etl::partition_point
constexpr auto partition_point(ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt
Examines the partitioned (as if by partition) range [first, last) and locates the end of the first pa...
Definition
partition_point.hpp:13
etl
Definition
adjacent_find.hpp:8
include
etl
_algorithm
partition_point.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0