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 43d0fa6 commit 911b6afCopy full SHA for 911b6af
lib/platform.h
@@ -1,3 +1,7 @@
1
+#if !defined(__has_extension)
2
+#define __has_extension(a) 0
3
+#endif
4
+
5
#if defined(__clang__) && defined(__has_attribute) && __has_attribute(musttail)
6
#define __musttail __attribute__((musttail))
7
#else
@@ -45,3 +49,10 @@
45
49
#define __alloc_size2(a, b)
46
50
#endif
47
51
52
53
+/* compile-time assertion */
54
+#if __STDC_VERSION__ >= 201112L || __has_extension(c_static_assert)
55
+#define ctassert(e) _Static_assert(e, #e)
56
+#else
57
+#define ctassert(e)
58
0 commit comments