Skip to content

Conversation

gentlegiantJGC
Copy link
Contributor

@gentlegiantJGC gentlegiantJGC commented Feb 18, 2025

Description

The def_property family blindly ignore the keep_alive and call_guard arguments passed to them making them confusing to use.
This adds a static_assert if either is passed to make it clear it doesn't work.
I would prefer this to be a compiler warning but I can't find a way to do that. Is that even possible?

This does not fix - #4236 or #5046 but makes it clear that they don't work.

Suggested changelog entry:

Stop keep_alive and call_guard being passed to def_property functions.

gentlegiantJGC and others added 2 commits February 18, 2025 12:27
The def_property family blindly ignore the keep_alive and call_guard arguments passed to them making them confusing to use.
This adds a static_assert if either is passed to make it clear it doesn't work.
I would prefer this to be a compiler warning but I can't find a way to do that. Is that even possible?
@rwgk
Copy link
Collaborator

rwgk commented Feb 26, 2025

(random timing, I'm cleaning up my email backlog)

Looks good, thanks! — 'll get back here a few days after #5542 is merged, but before the v3.0.0 release.

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