Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that default constructed objects are zero
In a generic context, we often need to compare arithmetic types to zero. However, mp-units types cannot be default constructed from (say) `double`, so we cann write (e.g.) ```cpp if (x < T(0)) { // ... } ``` Instead, we have to use ```cpp constexpr auto ZERO = T{}; if (x < ZERO) { // ... } ``` This begs the question: Do we have a guarantee that `ZERO==0.0`? Add a unit test that verifies this behavior.
- Loading branch information