Open
Description
Input C/C++ Header
template<int N>
using vec = double[N];
struct Thing {
vec<3> position;
vec<4> orientation;
double diameter;
};
Bindgen Invocation
$ bindgen --no-layout-tests test.hpp
Actual Results
pub type vec = *mut f64;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Thing {
pub position: vec,
pub orientation: vec,
pub diameter: f64,
}
impl Clone for Thing {
fn clone(&self) -> Self { *self }
}
Expected Results
pub struct Thing {
pub position: [f64; 3],
pub orientation: [f64; 4],
pub diameter: f64,
}
position
and orientation
are arrays of doubles. In the generated code, they are pointers.