mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
convenience overload for make_iterator()
This commit is contained in:
parent
1dc940d4b7
commit
bf0c7dcc22
@ -1013,6 +1013,10 @@ template <typename Iterator, typename... Extra> iterator make_iterator(Iterator
|
|||||||
return (iterator) cast(state { first, last });
|
return (iterator) cast(state { first, last });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Type, typename... Extra> iterator make_iterator(Type &value, Extra&&... extra) {
|
||||||
|
return make_iterator(std::begin(value), std::end(value), extra...);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename InputType, typename OutputType> void implicitly_convertible() {
|
template <typename InputType, typename OutputType> void implicitly_convertible() {
|
||||||
auto implicit_caster = [](PyObject *obj, PyTypeObject *type) -> PyObject * {
|
auto implicit_caster = [](PyObject *obj, PyTypeObject *type) -> PyObject * {
|
||||||
if (!detail::type_caster<InputType>().load(obj, false))
|
if (!detail::type_caster<InputType>().load(obj, false))
|
||||||
|
Loading…
Reference in New Issue
Block a user