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

Follow-on to google/pywrapcc#30093 (correction) #30098

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

rwgk
Copy link
Contributor

@rwgk rwgk commented Feb 7, 2024

Description

Bring back std::addressof(src) incorrectly removed with commit bcc40b2 (#30093).

This fixes an oversight in #30093: the operator&() const overload was missing in the test code.

Suggested changelog entry:

bcc40b2

Silly oversight: the `operator&() const` overload was missing in the test code.
@rwgk rwgk marked this pull request as ready for review February 7, 2024 19:39
@@ -57,7 +57,9 @@ union IntFloat {
class UnusualOpRef {
public:
using NonTrivialType = std::shared_ptr<int>; // Almost any non-trivial type will do.
NonTrivialType operator&() { return non_trivial_member; } // UNUSUAL operator.
// UNUSUAL operators:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about: "Overriding & operator should not break pybind11."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (928b5b4). Thanks!

@rwgk rwgk merged commit f468b2c into google:main Feb 7, 2024
108 checks passed
@rwgk rwgk deleted the type_caster_addressof_round2_pywrapcc branch February 7, 2024 19:55
rwgk pushed a commit to rwgk/pybind11 that referenced this pull request Jun 24, 2024
Includes follow-on to pybind#5189: Backport the smart_holder-specific changes from google/pybind11clif#30093 and google/pybind11clif#30098.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants