summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWormHeamer2025-11-25 18:47:28 -0500
committerWormHeamer2025-11-25 18:47:28 -0500
commitf7078d34566fe152e876878e05e8b1e3644cce88 (patch)
treeb133b274ea5892630b248ea563aaeaa35643f13a
parente3348515b9bbbea01b11298bb23276d7706c5c20 (diff)
add TYPEOF
-rw-r--r--wrmr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/wrmr.h b/wrmr.h
index fcbfc22..7d22ee2 100644
--- a/wrmr.h
+++ b/wrmr.h
@@ -58,4 +58,10 @@ typedef uintptr_t uptr;
# define ASSUME(...) do if (!(__VA_ARGS__)) UNREACHABLE_MSG("assumption failed: " #__VA_ARGS__); while(0);
#endif
+#if __STDC_VERSION__ >= 202311L
+# define TYPEOF(...) typeof(__VA_ARGS__)
+#else
+# define TYPEOF(...) __typeof__(__VA_ARGS__)
+#endif
+
#endif