You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks - this is, I think, likely to be a limitation for a long time (I believe bindgen doesn't give us the right information, and even if it did, cxx does not yet support std::function. However these diagnostics are not OK, and I regard that as a bug.
adetaylor
changed the title
Bindings to std::function
Bindings to std::function produce poor error messages
May 2, 2023
Solutions to improve this, then, would be one or several of the following:
In bindgen, output something more useful than an array when it encounters such a type.
In autocxx, during the function analysis phase, if we find a function has an array argument, then reject that function with a marginally more useful message. ("Arrays are not yet supported by cxx. Sometimes bindgen can generate arrays if it's not sure how to interpret a type, so the problem might be some other type not yet supported by bindgen.")
Either way, include span information from bindgen so that we can point to a more useful location in our error messages
I am trying to call c++ function which takes std::function as argument. But std::function is being interpreted as std::array
Below is my code.
test.h
main.rs
Cargo build error:
Specifications
autocxx = "0.25.0"
cxx = "1.0.94"
Could you please help if i miss something ?
The text was updated successfully, but these errors were encountered: