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
When generating C++ with derive_eq=true the implementation of the equality operator is wrong when using type aliases or #[repr(transparent)] structs, e.g.:
Then you'd still have to support an approach for C? Like memcmp the blocks? Technically, C++ classes with a single member are also repr[transparent], so you could also transfer the classes and implement Eq on the classes. Then the generated code would work again. Not sure which is preferable?
When generating C++ with
derive_eq=true
the implementation of the equality operator is wrong when using type aliases or#[repr(transparent)]
structs, e.g.:With
cbindgen.toml
:Generates this:
This fails a simple test in C++:
Test a, b; assert(a == b);
Output of
cargo tree
for reference:The text was updated successfully, but these errors were encountered: