-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
### Changes - Change `Duration` from explicit to implicit cast to/from `TimeSpan` - Remove operator overloads for `TimeSpan` now covered by implicit cast for all but left operands ### Background See #1354 (comment) One issue is that the operator overloads only work when `TimeSpan` is the right operand. I changed the code generation to take this into account, but another option would be to make a breaking change where we just don't support `TimeSpan` as the left operand at all. Then users would have to cast explicitly, or for multiplication just reverse the operands. This would affect 13 operators: ``` TimeSpan * Acceleration TimeSpan * ElectricCurrent TimeSpan * ElectricCurrentGradient TimeSpan * ForceChangeRate TimeSpan * KinematicViscosity TimeSpan * MassFlow TimeSpan * MolarFlow TimeSpan * Power TimeSpan * PressureChangeRate TimeSpan * RotationalSpeed TimeSpan * Speed TimeSpan * TemperatureChangeRate TimeSpan * VolumeFlow ``` Of which only 6 are used in tests so I assume are supported in v5: ``` TimeSpan * KinematicViscosity TimeSpan * MassFlow TimeSpan * Power TimeSpan * RotationalSpeed TimeSpan * TemperatureChangeRate TimeSpan * Speed ``` --------- Co-authored-by: Andreas Gullberg Larsen <andreas.larsen84@gmail.com>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.