Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict implicit dimensionless ctor to unscaled values
Implicit conversions to/from built-in types appear to be a potential source of confusion for dimensionless units with a scaling factor (e.g., percent<>) [0]. Disallowing implicit conversions in those cases might be a not-terrible way to eliminate this potential for confusion without decreasing usability. The idea for limiting the implicit conversion to unscaled values was adapted from mpusz/units [1]. I'm not entirely confident this implementation is the best approach, but it's at least not obviously broken. [0]: nholthaus#301 [1]: mpusz/mp-units#412 (comment)
- Loading branch information