Open
Description
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
#include "cxx.h"
#include <functional>
class A {
public:
A() {}
using RespHandler = std::function<void(int val)>;
void sendRequest(RespHandler handler) {
// handler(100);
}
}
main.rs
use autocxx::prelude::*;
include_cpp! {
#include "test.h"
safety!(unsafe)
generate!("A")
}
fn main() {
}
Cargo build error:
gen0.cxx: error: cannot convert 'void (A::*) (A::RespHandler)' {aka 'void (A::*) (std::function<void(int)>)'} to 'void (A::*) (std::array<long unsigned int, 4>)' in initialization
Specifications
autocxx = "0.25.0"
cxx = "1.0.94"
Could you please help if i miss something ?