std::ranges...face::cbegin(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– std::ranges::view_interface::cbegin β€” C++ Standard Library, bestie

🌸 NAME

std::ranges::view_interface::cbegin β€” that's the name, no cap. It's giving "tiny but important member function" energy.


πŸ“œ Synopsis

The default implementation of cbegin() member function returns a constant beginning iterator of the range. There's literally a diagram for this vibe: range-begin-end.svg
constexpr auto cbegin();                                       (1)
(since C++23)
constexpr auto cbegin() const requires ranges::range<const D>; (2)
(since C++23)
  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) β€” literally none, bestie. Not a single parameter. She's low-maintenance like that.


✨ 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. So yeah, this default implementation is doing a LOT of heavy lifting behind the scenes. Iconic behavior, honestly.


πŸ¦‹ Example

This section is incomplete Reason: no example

Not me being nosy, but the page is literally telling on itself here: no example yet. The category says it all: * Todo no example.


🌈 See also

  • begin
  • cbegin β€” returns an iterator to the beginning of a container or array
  • (C++11), (function template), (C++14)
  • ranges::cbegin β€” returns an iterator to the beginning of a read-only range
  • (C++20), (customization point object)

🏷️ Category

* Todo no example β€” yes, that's the category tag, verbatim, periodt.


okay bestie that's the whole page! the source/version in the footer is http://cppreference.com, the date is 2024.06.10, and the footer page label is std::ranges...face::cbegin(3). bye, love u, stay iterating πŸ’œβœ¨

πŸ“¦ where this page comes from