-
Notifications
You must be signed in to change notification settings - Fork 611
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
Units unary operators are not constexpr
#4137
Comments
calcmogul
added a commit
to calcmogul/allwpilib
that referenced
this issue
Mar 29, 2022
We've permanently forked from them at this point. Having one header with every unit in it had measurably worse compilation time and compiler memory usage compared to separate headers for each unit and a base header for common macro definitions. When we get C++20, we plan to look into migrating to https://github.com/mpusz/units/. |
calcmogul
added a commit
to calcmogul/allwpilib
that referenced
this issue
Mar 29, 2022
PeterJohnson
pushed a commit
that referenced
this issue
Mar 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Unary operators on units are not
constexpr
. Fixed in nholthaus/units#226, but the change not reflected in wpilib's units files (I'm not sure how/when wpilib's version of the units library is updated)constexpr meter_t x = 1_m;
worksconstexpr meter_t x = -1_m;
doesn'tDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: