forked from mpusz/mp-units
fix: printing of symbols with fractional powers fixed
This commit is contained in:
@@ -642,8 +642,8 @@ constexpr auto unit_symbol_impl(Out out, const power<F, Num, Den...>&, unit_symb
|
||||
constexpr ratio r = power<F, Num, Den...>::exponent;
|
||||
if constexpr (r.den != 1) {
|
||||
// add root part
|
||||
constexpr auto txt = txt + basic_fixed_string("^(") + regular<r.num>() + basic_fixed_string("/") +
|
||||
regular<r.den>() + basic_fixed_string(")");
|
||||
constexpr auto txt = basic_fixed_string("^(") + regular<r.num>() + basic_fixed_string("/") + regular<r.den>() +
|
||||
basic_fixed_string(")");
|
||||
return copy<CharT>(txt, fmt.encoding, out);
|
||||
} else if constexpr (r.num != 1) {
|
||||
// add exponent part
|
||||
|
||||
Reference in New Issue
Block a user