xo-unit: bugfix: promote representation accurately in xquantity
This commit is contained in:
parent
f49cce98b9
commit
6b95d09719
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ namespace xo {
|
|||
return xquantity<r_repr_type, r_int_type>(r_scale, x.unit_.template to_repr<r_int_type>());
|
||||
} else {
|
||||
/* units don't match! */
|
||||
return xquantity<r_repr_type, r_int_type>(std::numeric_limits<Repr>::quiet_NaN(),
|
||||
return xquantity<r_repr_type, r_int_type>(std::numeric_limits<r_repr_type>::quiet_NaN(),
|
||||
x.unit_.template to_repr<r_int_type>());
|
||||
}
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ namespace xo {
|
|||
return xquantity<r_repr_type, r_int_type>(r_scale, x.unit_.template to_repr<r_int_type>());
|
||||
} else {
|
||||
/* units don't match! */
|
||||
return xquantity<r_repr_type, r_int_type>(std::numeric_limits<Repr>::quiet_NaN(),
|
||||
return xquantity<r_repr_type, r_int_type>(std::numeric_limits<r_repr_type>::quiet_NaN(),
|
||||
x.unit_.template to_repr<r_int_type>());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue