Open
Description
Input C/C++ Header
class Parent {
public:
virtual ~Parent();
};
class Child: Parent {
public:
Child();
~Child();
};
Bindgen Invocation
bindgen::Builder::default()
.header("wrapper.hpp")
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.clang_arg("-x")
.clang_arg("c++")
.generate()
Actual Results
... more code...
impl Child {
#[inline]
pub unsafe fn new() -> Self {
let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
Child_Child(__bindgen_tmp.as_mut_ptr());
__bindgen_tmp.assume_init()
}
}
extern "C" {
#[link_name = "\u{1}_ZN5ChildD1Ev"]
pub fn Child_Child_destructor(this: *mut Child);
}
Expected Results
There should be a "pub unsafe fn destruct(&mut self)" in the "impl Child" section.
Note: In C++, first the virtual Parent destructor is callend then the Child destructor.