If you explicitely specify the denominator, be sure to use an *unsigned*
integer literal (e.g. 2u) – even though the template accepts only unsigned
integers anyway, this seems to make a difference.
Note: This was tailored to the specific needs of the units library, and
isn't optimized at all.
A compile-time rational number.
If you explicitely specify the denominator, be sure to use an *unsigned* integer literal (e.g. 2u) – even though the template accepts only unsigned integers anyway, this seems to make a difference.
Note: This was tailored to the specific needs of the units library, and isn't optimized at all.