fix: compile-time branch condition fixed in quantity_point::point_for

This commit is contained in:
Mateusz Pusz
2025-01-09 13:44:21 +01:00
parent db18eec823
commit 2d10a30d27

View File

@@ -264,7 +264,7 @@ public:
template<detail::SameAbsolutePointOriginAs<absolute_point_origin> NewPO>
[[nodiscard]] constexpr QuantityPointOf<(NewPO{})> auto point_for(NewPO new_origin) const
{
if constexpr (is_same_v<NewPO, decltype(point_origin)>)
if constexpr (is_same_v<NewPO, MP_UNITS_NONCONST_TYPE(point_origin)>)
return *this;
else
return ::mp_units::quantity_point{*this - new_origin, new_origin};