8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 15:23:03 +01:00

Workaround problem with static_assert(false) in gcc/clang compilers

This commit is contained in:
Vlad Khorsun 2024-11-07 14:37:51 +02:00
parent 216fb3e164
commit ba62d07a1e

View File

@ -275,6 +275,10 @@ namespace fb_utils
bool isBpbSegmented(unsigned parLength, const unsigned char* par);
// Workaround, to be removed with C++ 23
template <typename... T>
constexpr bool fb_always_false_v = false;
// Put integer value into info buffer
template<typename T>
inline unsigned char* putInfoItemInt(const unsigned char item, T value,
@ -308,7 +312,7 @@ namespace fb_utils
else if constexpr (len == sizeof(char))
*ptr = value;
else
static_assert(always_false<T>::value, "unknown data type");
static_assert(fb_always_false_v<T>, "unknown data type");
ptr += len;
return ptr;