-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly specify
QuantityPoint
calc type (#234)
We want to carry out our intermediate computations in the common type of the old and new rep, generally. However, we already know from #222 that if the new rep is a signed integer, and the old rep is unsigned, we need to be careful to use a signed type for intermediate computations. To preserve this behaviour but restore correct behavoiur for other cases (namely, #233), we add a new type trait for this intermediate type. It basically boils down to the common type, but with an explicit carve-out to keep #222 fixed. We explicitly cast both participants to this new type-for-intermediate-computations, and then cast to the destination rep at the end. Compile time tests showed no discernible impact at all. This change has also passed all Aurora-internal builds. Fixes #233.
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters