From 5b98aa5220f82823e8eee89328d7ecd08ad4317d Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Thu, 28 Jan 2021 01:37:23 +0100 Subject: [PATCH] Update breathe to 4.26.1, add make_tuple, make_iterator, and make_key_iterator --- docs/reference.rst | 12 +++++++++++- docs/requirements.txt | 2 +- include/pybind11/pybind11.h | 4 ++++ include/pybind11/pytypes.h | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index e3a61afb6b..a678d41c88 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -52,6 +52,17 @@ Convenience classes for specific Python types .. doxygengroup:: pytypes :members: +Convenience functions converting to Python types +================================================ + +.. doxygenfunction:: make_tuple(Args&&...) + +.. doxygenfunction:: make_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_iterator(Type &, Extra&&...) + +.. doxygenfunction:: make_key_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_key_iterator(Type &, Extra&&...) + .. _extras: Passing extra arguments to ``def`` or ``class_`` @@ -110,7 +121,6 @@ Exceptions .. doxygenclass:: builtin_exception :members: - Literals ======== diff --git a/docs/requirements.txt b/docs/requirements.txt index 9e6a3f637f..a1276a65d9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -breathe==4.25.1 +breathe==4.26.1 commonmark==0.9.1 recommonmark==0.7.1 sphinx==3.3.1 diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 3bffbb28d2..4fbb96ea13 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1890,7 +1890,9 @@ PYBIND11_NAMESPACE_END(detail) template ()), +#endif typename... Extra> iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) { using state = detail::iterator_state; @@ -1919,7 +1921,9 @@ iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) { template ()).first), +#endif typename... Extra> iterator make_key_iterator(Iterator first, Sentinel last, Extra &&... extra) { using state = detail::iterator_state; diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 78db7947d9..0a5bfef278 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -279,8 +279,10 @@ class object : public handle { struct borrowed_t { }; struct stolen_t { }; +#ifndef DOXYGEN_SHOULD_SKIP_THIS // Issue in breathe 4.26.1 template friend T reinterpret_borrow(handle); template friend T reinterpret_steal(handle); +#endif public: // Only accessible from derived classes and the reinterpret_* functions