Skip to content

Cannot use functors when exposing functions #8798

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

Closed
hkleynhans opened this issue Jun 14, 2019 · 4 comments
Closed

Cannot use functors when exposing functions #8798

hkleynhans opened this issue Jun 14, 2019 · 4 comments

Comments

@hkleynhans
Copy link
Contributor

I have a requirement to pass functors when registering functions (and anything else which accepts a function pointer) using embind. At the moment embind accepts pointers to functions and non-capturing lambdas, but nothing which contains state.

Possibly related to: #1914

@kripken kripken added the embind label Jun 14, 2019
@hkleynhans
Copy link
Contributor Author

hkleynhans commented Jul 4, 2019

The following adds the ability to use function objects and std::function objects in class_<T>.function: #8920

After this I will also submit patches to extending the same behavior to class_<T>.property, class_<T>.constructor and .function.

@hkleynhans
Copy link
Contributor Author

The following PR adds the ability to pass function objects and std::function to class_<T>.constructor: #9051

@hkleynhans
Copy link
Contributor Author

The following PR adds the ability to use function objects and std::function with class_<T>.property: #9172

@stale
Copy link

stale bot commented Aug 6, 2020

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Aug 6, 2020
@stale stale bot closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants