From bf0c7dcc2264317c5e741a00a4fa78b8e12d24cf Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 18 Apr 2016 10:52:12 +0200 Subject: [PATCH] convenience overload for make_iterator() --- include/pybind11/pybind11.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 22044feeb..a9707c483 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1013,6 +1013,10 @@ template iterator make_iterator(Iterator return (iterator) cast(state { first, last }); } +template iterator make_iterator(Type &value, Extra&&... extra) { + return make_iterator(std::begin(value), std::end(value), extra...); +} + template void implicitly_convertible() { auto implicit_caster = [](PyObject *obj, PyTypeObject *type) -> PyObject * { if (!detail::type_caster().load(obj, false))