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

Make unarary operator+() and operator-() constexpr #226

Merged
merged 2 commits into from
Oct 7, 2020

Conversation

alexdewar
Copy link
Contributor

These two functions can be safely marked constexpr.

At present, if you try to write:

constexpr meter_t x = -1_m;

you get an error.

This PR fixes this.

@JohelEGP
Copy link
Contributor

Note to self: Check commits between master..v3.x that could be reasonably backported.

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.

3 participants