Skip to content

Commit

Permalink
[qty.unit.types] Update Magnitude * Unit
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Pusz <[email protected]>
  • Loading branch information
JohelEGP and mpusz authored Oct 25, 2024
1 parent d9248b1 commit 824f0c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/api_reference/src/quantities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,12 @@
{
if constexpr (^const M == ^decltype(mag<1>))
return u;
else
else if constexpr (@\exposidnc{is-specialization-of}@(^U, ^scaled_unit)) {
if constexpr (M{} * U::mag == mag<1>)
return U::reference_unit;
else
return scaled_unit<M{} * U::mag, std::remove_const_t<decltype(U::reference_unit)>>{};
} else
return scaled_unit<M{}, U>{};
}
Expand Down

0 comments on commit 824f0c1

Please sign in to comment.