Skip to content

[embind] Add pointer policies for val's call, operator(), and new_. #24832

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brendandahl
Copy link
Collaborator

@brendandahl brendandahl commented Jul 31, 2025

After #24175, pointer policies were required in more places, but there
was no way to pass the policy into val's call, operator(), and new_
methods and use pointers.

All of these methods take variadic template arguments already
which made passing separate variadic policy arguments challenging. I used
some C++14/17 tricks to separate the regular arguments and policy
arguments.

Fixes #24398

…w_`.

After emscripten-core#24175, pointer policies were required in more places, but there
was no way to pass the policy into val's `call`, `operator()`, and `new_`
methods and use pointers.

All of these methods take variadic template arguments already
which made passing separate variadic policy arguments challenging. I used
some C++14/17 tricks to separate the regular arguments and policy
arguments.
@brendandahl brendandahl requested review from sbc100 and RReverser July 31, 2025 23:25
@brendandahl
Copy link
Collaborator Author

reviewer: The first commit is just moving policy code into wire.h, so it's probably easier to look at the second commit on its own.

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.

Cannot compile projects with emsdk 4.0.9
1 participant