mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
refactor: branch with constant condition changed to if constexpr
This commit is contained in:
@@ -879,7 +879,7 @@ constexpr Out unit_symbol_impl(Out out, const type_list<Nums...>& nums, const ty
|
||||
if (fmt.solidus == always || (fmt.solidus == one_denominator && sizeof...(Dens) == 1)) {
|
||||
if constexpr (sizeof...(Nums) == 0) *out++ = '1';
|
||||
*out++ = '/';
|
||||
if (sizeof...(Dens) > 1) *out++ = '(';
|
||||
if constexpr (sizeof...(Dens) > 1) *out++ = '(';
|
||||
} else if constexpr (sizeof...(Nums) > 0) {
|
||||
out = print_separator<CharT>(out, fmt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user