diff --git a/include/orm/utils/integralcast.hpp b/include/orm/utils/integralcast.hpp index 0da6435e3..e3f6637e9 100644 --- a/include/orm/utils/integralcast.hpp +++ b/include/orm/utils/integralcast.hpp @@ -46,11 +46,19 @@ namespace Private return "int64 (long)"; else if constexpr (sizeof (T) == 2) return "int16 (long)"; + +#if defined(__GNUG__) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13 + else { + Q_UNREACHABLE(); + return " (long)"; + } +#else else // This should never happen :/ static_assert (false, "Unhandled code branch in the Private::IntegralTypeName() " "(long)."); +#endif } else if constexpr (std::is_same_v) { @@ -60,11 +68,19 @@ namespace Private return "uint64 (ulong)"; else if constexpr (sizeof (T) == 2) return "uint16 (ulong)"; + +#if defined(__GNUG__) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13 + else { + Q_UNREACHABLE(); + return " (ulong)"; + } +#else else // This should never happen :/ static_assert (false, "Unhandled code branch in the Private::IntegralTypeName() " "(ulong)."); +#endif } else if constexpr (std::is_same_v) @@ -80,10 +96,18 @@ namespace Private unsigned char, but is always a distinct type. */ else if constexpr (std::is_same_v) return "char"; + +#if defined(__GNUG__) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13 + else { + Q_UNREACHABLE(); + return ""; + } +#else else // This should never happen :/ static_assert (false, "Unhandled code branch in the Private::IntegralTypeName()."); +#endif } /*! Compute number group separators count for reserve for formatNumber() function. */ @@ -202,10 +226,17 @@ namespace Private // Comparing any type with 0 is always safe return value >= 0 && value <= std::numeric_limits::max(); +#if defined(__GNUG__) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13 + else { + Q_UNREACHABLE(); + return false; + } +#else else // This should never happen :/ static_assert (false, "Unhandled code branch in the Private::InRange()."); +#endif } } // namespace Private