You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constexprauto result = 144 * km / (2 * h);
static_assert(std::is_same_v<decltype(result)::dimension,
unknown_dimension<exponent<dim_length, 1>, exponent<dim_time, -1>>>);
static_assert(std::is_same_v<decltype(result)::unit,
scaled_unit<ratio(1, 36, 1), unknown_coherent_unit>>);
Error messages containing unknown units could be improved if instead the unit's type were formed like expression templates. In this case, it could be something like unknown_unit<kilometre, per<hour>>.
What do you think?
The text was updated successfully, but these errors were encountered:
An example at https://mpusz.github.io/units/use_cases/unknown_dimensions.html includes:
Error messages containing unknown units could be improved if instead the unit's type were formed like expression templates. In this case, it could be something like
unknown_unit<kilometre, per<hour>>
.What do you think?
The text was updated successfully, but these errors were encountered: