-
Notifications
You must be signed in to change notification settings - Fork 7
Extend return_value_policy_pack
support to py::cast()
and trampolines
#30015
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
Merged
rwgk
merged 17 commits into
google:main
from
wangxf123456:return_value_policy_pack_followup
Mar 20, 2023
Merged
Extend return_value_policy_pack
support to py::cast()
and trampolines
#30015
rwgk
merged 17 commits into
google:main
from
wangxf123456:return_value_policy_pack_followup
Mar 20, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…turn_value_policy_pack.cpp
…constexpr` for `return_value_policy` shortcuts.
…1_OVERRIDE_NAME_RVPP
Resolves clang-tidy errors: `'virtual' is redundant since the function is already declared 'override'`
…VPP versions (no other changes).
… rely on __VA_OPT__ __VA_OPT__ is a C++20 feature that is supported only by some pre-C++20 compilers but not all. The dangling commas (/* no arguments */) in the PYBIND11_OVERRIDE_.*NAME_RVPP invocations need to be removed.
…s, even the newest).
…assing while testing locally.
…w PYBIND11_OVERRIDE.*_NAME_RVPP macros.
…ERRIDE_PURE_NAME, PYBIND11_OVERRIDE_PURE_NAME_RVPP
return_value_policy_pack
support to py::cast
and trampolines
return_value_policy_pack
support to py::cast
and trampolinesreturn_value_policy_pack
support to py::cast()
and trampolines
The changes look good to me. |
lanctot
pushed a commit
to google-deepmind/open_spiel
that referenced
this pull request
Mar 27, 2023
`PYBIND11_OVERRIDE_IMPL` is an implementation detail and not meant to be used outside the pybind11 source tree. Notes: * For easy reference: `PYBIND11_OVERRIDE_IMPL` was added to python_games.cc in cl/379240506. * Discovered in connection with google/pybind11clif#30015, which changes `PYBIND11_OVERRIDE_IMPL`. (The pywrapcc fork of pybind11 is not currently used in production, but we're using it regularly to run TAP Global Presubmits, to test go/pyclif_pybind11_fusion developments.) * FYI: Test coverage seems to be incomplete: control flow passes through the changed code for many tests, but replacing `"mean_field_population"` with `"XXXmean_field_population"` does not break any tests (see isolated TGP results under http://tap/OCL:517999370:BASE:517998831:1679332509158:a5f7412a). I.e. a test with a Python override is missing. * FYI: The `PYBIND11_OVERLOAD_*` macros used in other parts of python_games.cc are deprecated since Sep 2020 (pybind/pybind11#2325). It is recommended to replace them with the equivalent `PYBIND11_OVERRIDE_*` macros. PiperOrigin-RevId: 518266312 Change-Id: Ica90764a71b8ed7795b2f26ab02a904bf2ad901e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow-on to #30011, to make the
return_value_policy_pack
support more complete:py::cast()
PYBIND11_OVERRIDE_NAME_RVPP
,PYBIND11_OVERRIDE_PURE_NAME_RVPP
Suggested changelog entry: