-
Notifications
You must be signed in to change notification settings - Fork 2.2k
def_buffer doesn't accept pointer-to-member-function #857
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
Comments
bmerry
added a commit
to bmerry/pybind11
that referenced
this issue
May 17, 2017
Closes pybind#857. Instead of calling the function object directly, it wraps it in std::bind and then immediately calls that. This is a poor-man's form of std::invoke (not available in C++11 or C++14).
bmerry
added a commit
to bmerry/pybind11
that referenced
this issue
May 22, 2017
Closes pybind#857, by adding overloads to def_buffer that match pointers to member functions and wrap them in lambdas.
bmerry
added a commit
to bmerry/pybind11
that referenced
this issue
May 22, 2017
Closes pybind#857, by adding overloads to def_buffer that match pointers to member functions and wrap them in lambdas.
jagerman
pushed a commit
that referenced
this issue
May 22, 2017
Closes #857, by adding overloads to def_buffer that match pointers to member functions and wrap them in lambdas.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
The implementation of
def_buffer
directly calls the passed function or function object, so a pointer-to-member-function causes compilation errors.I'll provide a PR to fix it (I've got some code that should work, just need to add a regression test).
Reproducible example code
Output (GCC 5.4):
The text was updated successfully, but these errors were encountered: