constexprauto begin() requires(!/*simple-view*/<V>); | (1) | (since C++20) |
| (2) | (since C++20) |
| | |
Returns an iterator to the first element of the view. Effectively callsranges::begin on the underlying viewbase_.
Overload(1) does not participate in overload resolution ifV is asimple view (that is, ifV andconst V are views with the same iterator and sentinel types).
[edit]Parameters
(none)
[edit]Return value
ranges::begin(base_), wherebase_ is the underlying view.
[edit]Example
| This section is incomplete Reason: no example |
[edit]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 | theconst overload might return an iterator non-comparable to the sentinel | constrained |
[edit]See also
| returns a sentinel representing the end (public member function)[edit] |
| compares a sentinel with an iterator returned fromtake_while_view::begin (function)[edit] |