We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f51d9 commit 549f444Copy full SHA for 549f444
src/common/utils_proto.h
@@ -267,6 +267,10 @@ namespace fb_utils
267
bool isBpbSegmented(unsigned parLength, const unsigned char* par);
268
269
270
+ // Workaround, to be removed with C++ 23
271
+ template <typename... T>
272
+ constexpr bool fb_always_false_v = false;
273
+
274
// Put integer value into info buffer
275
template<typename T>
276
inline unsigned char* putInfoItemInt(const unsigned char item, T value,
@@ -300,7 +304,7 @@ namespace fb_utils
300
304
else if constexpr (len == sizeof(char))
301
305
*ptr = value;
302
306
else
303
- static_assert(len == 0, "unknown data type");
307
+ static_assert(fb_always_false_v<T>, "unknown data type");
308
309
ptr += len;
310
return ptr;
0 commit comments