forked from mpusz/mp-units
same_as
remplaced with is_same_v
in if constexpr
This commit is contained in:
@@ -62,11 +62,11 @@ constexpr auto prefix_or_ratio_text()
|
|||||||
return basic_fixed_string("");
|
return basic_fixed_string("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if constexpr (!std::same_as<PrefixType, no_prefix>) {
|
if constexpr (!std::is_same_v<PrefixType, no_prefix>) {
|
||||||
// try to form a prefix
|
// try to form a prefix
|
||||||
using prefix = downcast<detail::prefix_base<PrefixType, Ratio>>;
|
using prefix = downcast<detail::prefix_base<PrefixType, Ratio>>;
|
||||||
|
|
||||||
if constexpr(!std::same_as<prefix, prefix_base<PrefixType, Ratio>>) {
|
if constexpr(!std::is_same_v<prefix, prefix_base<PrefixType, Ratio>>) {
|
||||||
// print as a prefixed unit
|
// print as a prefixed unit
|
||||||
return prefix::symbol;
|
return prefix::symbol;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user