Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpimath] Make Rotation2d constexpr using gcem #2705

Closed
wants to merge 1 commit into from

Conversation

prateekma
Copy link
Member

This includes the GCEM library (https://github.com/kthohr/gcem) for compile-time cmath functions in order to make Rotation2d constexpr.

@prateekma prateekma requested a review from a team as a code owner September 13, 2020 02:39
@prateekma prateekma force-pushed the constexpr-rotation2d branch 4 times, most recently from b5bf599 to ad3abff Compare October 2, 2020 02:25
@PeterJohnson
Copy link
Member

Per Thad, the Windows build breakage appears to be related to microsoft/STL#519. Workaround is to explicitly cast the input to double.

@prateekma prateekma force-pushed the constexpr-rotation2d branch 2 times, most recently from dabe6dc to 9945df2 Compare October 5, 2020 00:20
@PeterJohnson
Copy link
Member

This pessimizes non-constexpr usage. C++20 will provide std::is_constant_evaluated() that will fix this issue, and we should wait for that to be available on our target compilers/platforms.

@prateekma
Copy link
Member Author

Closing until C++20 is supported by our compilation tools on all platforms.

@prateekma prateekma closed this Oct 9, 2020
@prateekma prateekma deleted the constexpr-rotation2d branch November 12, 2020 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants