Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permit integer-dividing quantity-equivalent units
This means we need to know the unit inside of `warn_if_integer_division()`, which seems OK. For the raw number cases, we synthesize a unitless unit. One weird thing is that sometimes the template parameters for `warn_if_integer_division()` are for the numerator, and sometimes for the denominator. But it still gives the correct answer in all cases. If both are `Quantity` types, then it doesn't matter which is which, because "both integers and quantity-inequivalent units" is symmetric. And if one is a raw number, then `warn_if_integer_division()` is _not_ symmetric, but that's fine because we simply don't _call it_ from the `Q / N` variant (which is always fine); we only call it from the `N / Q` variant (which might not be fine). Fixes #249.
- Loading branch information