Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix constructors for structs with enum fields.
Fixes #1170. Previously we were failing to identify that structs with enum fields were movable. This led to compilation failures in cases where there were APIs referring to Vec<SomeSuchStruct>, since we chose not to impl CxxVector<SomeSuchStruct> as thought it was not movable. This commit makes two changes to fix this: * It considers that enums have implicit constructors. * Previously, <Api as HasDependencies>::deps() was failing to list field or base dependencies for non-POD structs. This meant that depth_first failed to ensure that field types were considered prior to a struct in analyzing such implicit constructors. Normally this doesn't matter because types must be declared first, but in the case of nested or incomplete types this could have led to a faulty analysis.
- Loading branch information