aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/util.h b/stdlib/util.h
index 98c087a7..6f79bed6 100644
--- a/stdlib/util.h
+++ b/stdlib/util.h
@@ -19,6 +19,8 @@
#define IF_DECLARE(decl, expr, block) if (({ decl; expr ? ({ block; 1; }) : 0; })) {}
+#define WHEN(subj, var, body) { auto var = subj; switch (var.$tag) body }
+
#ifndef auto
#define auto __auto_type
#endif