mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 13:14:29 +02:00
fix: invalid assertions fixed
This commit is contained in:
@@ -516,12 +516,12 @@ constexpr Out copy(const basic_symbol_text<UnicodeCharT, N, M>& txt, text_encodi
|
|||||||
if (is_same_v<CharT, UnicodeCharT>)
|
if (is_same_v<CharT, UnicodeCharT>)
|
||||||
return copy(txt.unicode(), out).out;
|
return copy(txt.unicode(), out).out;
|
||||||
else
|
else
|
||||||
static_assert("Unicode text can't be copied to CharT output");
|
throw std::invalid_argument("Unicode text can't be copied to CharT output");
|
||||||
} else {
|
} else {
|
||||||
if (is_same_v<CharT, char>)
|
if (is_same_v<CharT, char>)
|
||||||
return copy(txt.ascii(), out).out;
|
return copy(txt.ascii(), out).out;
|
||||||
else
|
else
|
||||||
static_assert("ASCII text can't be copied to CharT output");
|
throw std::invalid_argument("ASCII text can't be copied to CharT output");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user