Closed
Description
I plan to land parsing and code generation support for complex types. My initial plan is landing it as a constant array of items, but that doesn't mean we can't do better.
We'd need to add a new TypeKind::Complex(ItemId)
, then use that to represent complex types. Then, at code generation, we can do something like what we do with unions, and conditionally prepend a prelude that might look like:
#[repr(C)]
#[derive(ABunchOfThings)]
struct __BindgenComplex<T> {
real: T,
imaginary: T,
};
With arithmetic operations on top of it.