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 eda455e commit af97b83Copy full SHA for af97b83
1 file changed
middleware/include/bitstream.h
@@ -8,7 +8,9 @@
8
#include <stddef.h>
9
#include <math.h>
10
11
-#define STATIC_ASSERT _Static_assert // Compile-time assertion (C11 thing)
+/* Throws a compile-time error if the assert fails */
12
+#define STATIC_ASSERT(condition, message) \
13
+ typedef char static_assertion_##__LINE__[(condition) ? 1 : -1]
14
15
typedef struct {
16
uint8_t *data; // The bitstream data, stored as bytes
0 commit comments