summaryrefslogtreecommitdiffhomepage
path: root/compat/meta.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-18 19:35:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-18 19:35:29 +0100
commitd361f57c8064ce13a0478653050b169dc94e2e99 (patch)
tree73613b75bc4e6533455b6c3ad79c3fa39b8554fb /compat/meta.hpp
parent2ab18fd01bc7c46043429511a3801846b998c749 (diff)
compat/util: retire
Adjust usages.
Diffstat (limited to 'compat/meta.hpp')
-rw-r--r--compat/meta.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/meta.hpp b/compat/meta.hpp
index ce81b3d0..80eca89a 100644
--- a/compat/meta.hpp
+++ b/compat/meta.hpp
@@ -12,6 +12,11 @@
template<typename t>
using cv_qualified = std::conditional_t<std::is_fundamental_v<std::decay_t<t>>, std::decay_t<t>, const t&>;
+#define progn(...) (([&]() { __VA_ARGS__ })())
+#define prog1(x, ...) (([&]() { auto _ret1324 = (x); do { __VA_ARGS__; } while (0); return _ret1324; })())
+
+#define once_only(...) do { static bool once__ = false; if (!once__) { once__ = true; __VA_ARGS__; } } while(false)
+
#if 0
#include <tuple>