Update breathe to 4.26.1, add make_tuple, make_iterator, and make_key_iterator (#2828)

This commit is contained in:
Yannick Jadoul 2021-01-28 12:28:16 +01:00 committed by GitHub
parent 9b7bfef833
commit 587d5f840a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View File

@ -52,6 +52,17 @@ Convenience classes for specific Python types
.. doxygengroup:: pytypes .. doxygengroup:: pytypes
:members: :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: .. _extras:
Passing extra arguments to ``def`` or ``class_`` Passing extra arguments to ``def`` or ``class_``
@ -110,7 +121,6 @@ Exceptions
.. doxygenclass:: builtin_exception .. doxygenclass:: builtin_exception
:members: :members:
Literals Literals
======== ========

View File

@ -1,4 +1,4 @@
breathe==4.25.1 breathe==4.26.1
commonmark==0.9.1 commonmark==0.9.1
recommonmark==0.7.1 recommonmark==0.7.1
sphinx==3.3.1 sphinx==3.3.1

View File

@ -1890,7 +1890,9 @@ PYBIND11_NAMESPACE_END(detail)
template <return_value_policy Policy = return_value_policy::reference_internal, template <return_value_policy Policy = return_value_policy::reference_internal,
typename Iterator, typename Iterator,
typename Sentinel, typename Sentinel,
#ifndef DOXYGEN_SHOULD_SKIP_THIS // Issue in breathe 4.26.1
typename ValueType = decltype(*std::declval<Iterator>()), typename ValueType = decltype(*std::declval<Iterator>()),
#endif
typename... Extra> typename... Extra>
iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) { iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) {
using state = detail::iterator_state<Iterator, Sentinel, false, Policy>; using state = detail::iterator_state<Iterator, Sentinel, false, Policy>;
@ -1919,7 +1921,9 @@ iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra) {
template <return_value_policy Policy = return_value_policy::reference_internal, template <return_value_policy Policy = return_value_policy::reference_internal,
typename Iterator, typename Iterator,
typename Sentinel, typename Sentinel,
#ifndef DOXYGEN_SHOULD_SKIP_THIS // Issue in breathe 4.26.1
typename KeyType = decltype((*std::declval<Iterator>()).first), typename KeyType = decltype((*std::declval<Iterator>()).first),
#endif
typename... Extra> typename... Extra>
iterator make_key_iterator(Iterator first, Sentinel last, Extra &&... extra) { iterator make_key_iterator(Iterator first, Sentinel last, Extra &&... extra) {
using state = detail::iterator_state<Iterator, Sentinel, true, Policy>; using state = detail::iterator_state<Iterator, Sentinel, true, Policy>;

View File

@ -279,8 +279,10 @@ protected:
struct borrowed_t { }; struct borrowed_t { };
struct stolen_t { }; struct stolen_t { };
#ifndef DOXYGEN_SHOULD_SKIP_THIS // Issue in breathe 4.26.1
template <typename T> friend T reinterpret_borrow(handle); template <typename T> friend T reinterpret_borrow(handle);
template <typename T> friend T reinterpret_steal(handle); template <typename T> friend T reinterpret_steal(handle);
#endif
public: public:
// Only accessible from derived classes and the reinterpret_* functions // Only accessible from derived classes and the reinterpret_* functions