.. index:: py::builtins::range::end .. _doxycast_pypp_classpy_1_1builtins_1_1range_1af93c7e91471958b7b52e17359ce11098: .. _py-builtins-range-end: *py::builtins::range::*\ end ============================ .. code-block:: cpp constexpr const_iterator end() const; Returns a constant iterator to one past the last value of the range. .. warning:: Iterators of ``range`` don't support ``operator ->`` as they are constructed on demand. .. tip:: Equivalent to :ref:`py-builtins-range-cend`. .. graphviz:: ../assets/range-begin-end.dot Return value ------------ A constant iterator to one past the last value. Complexity ---------- Constant. Example ------- .. code-block:: cpp #include #include int main() { py::range range(4); py::print(*(range.end() - 1)); } **Output**: .. code-block:: text 3