Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smart_holder] Backport of pybind11clif type_caster_std_function_specializations feature. #5289

Commits on Aug 6, 2024

  1. Equivalent of PR pybind#4597, but based on pybind11k main @ ab472bbce…

    …81de4e0ae41d861a5c46903968f7b27
    
    The pybind11k `return_value_policy_pack` and `function_record` changes were backed out.
    
    The net diffs to PR pybind#4597 are merely:
    
    ```diff
    +#define PYBIND11_HAS_TYPE_CASTER_STD_FUNCTION_SPECIALIZATIONS
    ```
    
    ```diff
    -    explicit func_wrapper_base(func_handle &&hf) noexcept : hfunc(hf) {}
    +    explicit func_wrapper_base(func_handle &&hf) noexcept : hfunc(std::move(hf)) {}
    ```
    Ralf W. Grosse-Kunstleve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    50361b1 View commit details
    Browse the repository at this point in the history
  2. Remove std::move to resolve clang-tidy error:

    ```
    /__w/pybind11/pybind11/include/pybind11/functional.h:47:67: error: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg,-warnings-as-errors]
       47 |     explicit func_wrapper_base(func_handle &&hf) noexcept : hfunc(std::move(hf)) {}
          |                                                                   ^~~~~~~~~~  ~
    /__w/pybind11/pybind11/include/pybind11/functional.h:23:8: note: 'func_handle' is not move assignable/constructible
    ```
    Ralf W. Grosse-Kunstleve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    369daf5 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. Merge branch 'smart_holder' into type_caster_std_function_specializat…

    …ions_sh
    Ralf W. Grosse-Kunstleve committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    54c8c4d View commit details
    Browse the repository at this point in the history