std::ranges::common_view::begin - cppreference.com (original) (raw)

constexpr auto begin() requires (!/*simple_view*/<V>); (1) (since C++20)
constexpr auto begin() const requires range<const V>; (2) (since C++20)
  1. Same as (1), but V is const-qualified.

[edit] Return value

An iterator to the beginning of the underlying view.

[edit] 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 4012 C++20 non-const overload missed simple-view check added

[edit] See also

| | returns an iterator to the end (public member function) [edit] | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | returns an iterator to the beginning of a range(customization point object)[edit] | | | returns a sentinel indicating the end of a range(customization point object)[edit] |