[wpimath] Fix various constexpr support bugs (#7676)

This commit is contained in:
Tyler Veness
2025-01-13 13:44:55 -08:00
committed by GitHub
parent cd92b07321
commit 25e6549398
10 changed files with 454 additions and 73 deletions

View File

@@ -308,8 +308,13 @@ TEST(Rotation3dTest, Inequality) {
}
TEST(Rotation3dTest, ToMatrix) {
#if __GNUC__ <= 11
Rotation3d before{10_deg, 20_deg, 30_deg};
Rotation3d after{before.ToMatrix()};
#else
constexpr Rotation3d before{10_deg, 20_deg, 30_deg};
constexpr Rotation3d after{before.ToMatrix()};
#endif
EXPECT_EQ(before, after);
}