commit cff83d8bee62682e8a947296c7dd865e7784700a
parent 8cef059876ea71395dec1365af7fe4c4c9ddfc31
Author: Amin Mesbah <dev@aminmesbah.com>
Date: Tue, 21 May 2019 16:16:16 -0700
Define static_assert if we need to
On Windows, assert.h doesn't do this for us.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/game.h b/src/game.h
@@ -1,4 +1,11 @@
#include <assert.h>
+
+// NOTE(amin): On windows, even with clang and -std=c11, assert.h doesn't
+// define static_assert.
+#ifndef static_assert
+#define static_assert _Static_assert
+#endif
+
#include <limits.h>
#include <math.h>
#include <stdalign.h>