From b78abce0ae34f0ab6f00c0c716bd9fd0c9f3a6e9 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sat, 22 Oct 2022 20:19:51 +0200 Subject: [PATCH] fix: invalid assertions fixed --- src/core/include/units/unit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/include/units/unit.h b/src/core/include/units/unit.h index 457ebab2..244621b7 100644 --- a/src/core/include/units/unit.h +++ b/src/core/include/units/unit.h @@ -516,12 +516,12 @@ constexpr Out copy(const basic_symbol_text& txt, text_encodi if (is_same_v) return copy(txt.unicode(), out).out; 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 { if (is_same_v) return copy(txt.ascii(), out).out; 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"); } }