std::ranges::view_interface<D>::cbegin - cppreference.com
来自cppreference.com
| (1) | (C++23 起) | |
constexpr auto cbegin() const requires ranges::range<const D>; |
(2) | (C++23 起) |
cbegin() 成员函数的默认实现返回范围的常量起始迭代器。
1) 令 derived 为绑定到 static_cast<D&>(*this) 的引用。
等价于 return ranges::cbegin(derived);。
2) 同 (1),但 derived 为 static_cast<const D&>(*this)。
返回值
范围的常量起始迭代器。
注解
标准库中的所有范围适配器及范围工厂和 std::ranges::subrange 都使用 cbegin 的默认实现。