diff --git a/src/common/utils_proto.h b/src/common/utils_proto.h index a4c0898e4e..d2e026f27b 100644 --- a/src/common/utils_proto.h +++ b/src/common/utils_proto.h @@ -267,6 +267,10 @@ namespace fb_utils bool isBpbSegmented(unsigned parLength, const unsigned char* par); + // Workaround, to be removed with C++ 23 + template + constexpr bool fb_always_false_v = false; + // Put integer value into info buffer template inline unsigned char* putInfoItemInt(const unsigned char item, T value, @@ -300,7 +304,7 @@ namespace fb_utils else if constexpr (len == sizeof(char)) *ptr = value; else - static_assert(len == 0, "unknown data type"); + static_assert(fb_always_false_v, "unknown data type"); ptr += len; return ptr;