py::builtins::range::cbegin¶
constexpr const_iterator cbegin() const;
Returns a constant iterator to the first value of the range.
Warning
Iterators of range don’t support operator -> as they
are constructed on demand.
Tip
Equivalent to py::builtins::range::begin.
Return value¶
A constant iterator to the first value.
Complexity¶
Constant.
Example¶
#include <pypp/builtins/range.hpp>
#include <pypp/builtins/print.hpp>
int main()
{
py::range<int> range(4);
py::print(*range.cbegin());
}
Output:
0