.. index:: py::builtins::operator ->* [py::builtins::range] .. _doxycast_pypp_namespacepy_1_1builtins_1a8b1d29962054ece4a6ff6f7f7568fc18: .. _py-builtins-operator-pointer_to_member-range: *py::builtins::*\ operator ->* (:ref:`py::builtins::range `) (specialization) ================================================================================================ *Defined in* ```` .. code-block:: cpp template bool operator ->* (const type& element, const in>& range); Returns whether a range contains a value. Template parameters ------------------- ``type``: Type of the value to find. Parameters ---------- ``value``: The value to find. ``range``: An ``py::builtins::in`` object referencing range. Return value ------------ Whether the range contains a value. Complexity ---------- Constant. Example ------- .. code-block:: cpp #include #include #include int main() { py::range nums(6); py::print(4 ->* py::in(nums)); } **Output**: .. code-block:: text true