-
Notifications
You must be signed in to change notification settings - Fork 665
Open
Labels
component: wpiutilWPI utility libraryWPI utility librarytype: bugSomething isn't working.Something isn't working.
Description
Instead of creating an array of the target schema type, wpi::MakeStructArraySchema
(and by extension wpi::Struct<std::array<T, N>>::GetSchema()
) instead copies the schema from the target type and makes the last field an array.
For example, consider the struct definition for a std::array<frc::Pose2d, 2>
. The expected schema should look something like:
Pose2d values[2]
However, the generated schema is instead:
Translation2d translation;Rotation2d rotation[2]
which is not equivalent to our desired array.
Because an identifier is required in a struct schema, I believe wpi::MakeStructArraySchema
should take a std::string_view ident
, and the Struct template specialization should as a result be wpi::Struct<std::array<T, N>, std::string_view, I...>
.
Metadata
Metadata
Assignees
Labels
component: wpiutilWPI utility libraryWPI utility librarytype: bugSomething isn't working.Something isn't working.