std::ranges::take_while_view<V,Pred>::begin
From cppreference.com
< cpp | ranges | take while view
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|||||||||||||||||
|
constexpr
auto begin(
) requires (
!
/*simple-view*/
<V>
)
;
|
(1) | (since C++20) |
|
constexpr
auto begin(
)
const requires
ranges::range<const V> && |
(2) | (since C++20) |
Returns an iterator to the first element of the view. Effectively calls ranges::begin on the underlying view base_
Overload (1) does not participate in overload resolution if V is a simple view (that is, if V and const V
Parameters
(none)
Return value
ranges::begin(base_), where base_
Example
| This section is incomplete Reason: no example |
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3450 | C++20 | the const overload might return an iterator non-comparable to the sentinel | constrained |
See also
| returns a sentinel representing the end (public member function) |
|
|
(C++20)
|
compares a sentinel with an iterator returned from take_while_view::begin (function) |