std::ranges::view_interface<D>::cbegin

From cppreference.com
 
 
Ranges library
Range access
Range conversions
(哋它亢++23)(哋它亢++23)
(哋它亢++23)

Range primitives
(哋它亢++23)(哋它亢++23)    
(哋它亢++23)



Dangling iterator handling
Range concepts
Views

Range factories
(哋它亢++23)(哋它亢++23)
Range adaptors
(哋它亢++23)(哋它亢++23)
(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
Range generators
(哋它亢++23)
Range adaptor objects
Range adaptor closure objects
(哋它亢++23)
Helper items
(until 哋它亢++23)(哋它亢++23)


 
 
constexpr auto cbegin();
(1) (since 哋它亢++23)
constexpr auto cbegin() const requires ranges::range<const D>;
(2) (since 哋它亢++23)

The default implementation of cbegin() member function returns a constant beginning iterator of the range.

range-begin-end.svg

1) Let derived be a reference bound to static_cast<D&>(*this).
Equivalent to return ranges::cbegin(derived);.
2) Same as (1), except that derived is static_cast<const D&>(*this).

Parameters

(none)

Return value

A constant beginning iterator of the range.

Notes

All range adaptors and range factories in the standard library and std::ranges::subrange use the default implementation of cbegin.

Example

See also

(哋它亢++11)(哋它亢++14)
returns an iterator to the beginning of a container or array
(function template)
(哋它亢++20)
returns an iterator to the beginning of a read-only range
(customization point object)