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

Experiments on top of PR #3643 (pybind11_select_caster) #3674

Closed
wants to merge 25 commits into from

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Feb 1, 2022

Description

WIP on top of #3643.

Suggested changelog entry:

@rwgk rwgk force-pushed the adl-caster_sandbox_pr branch from 0401bda to 21763f2 Compare February 2, 2022 18:23
in every compilation unit of the Python extension module. Otherwise,
undefined behavior can ensue.

* The preferred method is to *declare* a function named
Copy link

Choose a reason for hiding this comment

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

"When you own the namespace where the type is defined, the preferred method..."

amauryfa and others added 24 commits February 6, 2022 08:11
- There is no ODR violation when different translation units define
  different conversions.
- The declarations need to be defined in the original namespace.
"explicit specialization 'void pybind11::detail::cast_safe<void>(pybind11::object &&)' is not a specialization of a function template"
@rwgk rwgk force-pushed the adl-caster_sandbox_pr branch from 6db1e04 to dfd923d Compare February 6, 2022 16:12
@rwgk
Copy link
Collaborator Author

rwgk commented Feb 6, 2022

The force push was purely for git rebase master.

rwgk pushed a commit that referenced this pull request Apr 11, 2022
* Cleanup cast_safe<void> specialization

Replace explicit specialization of cast_safe<void> with SFINAE.
It's better for SFINAE cases to cover all type-sets rather than mixing SFINAE and explicit specialization.

Extracted from #3674

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update cast.h

Use detail::none_of<> as suggested

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update cast.h

Reorder:
If TEMP_REF
If VOID
if (!VOID && !TEMP_REF)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
laramiel added a commit to laramiel/pybind11 that referenced this pull request Apr 11, 2022
@laramiel
Copy link
Contributor

I have reworked this on top of HEAD with #3862

@rwgk
Copy link
Collaborator Author

rwgk commented Apr 11, 2022

Work continued under #3862.

@rwgk rwgk closed this Apr 11, 2022
rwgk pushed a commit to laramiel/pybind11 that referenced this pull request May 13, 2022
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.

3 participants