summaryrefslogtreecommitdiffhomepage
path: root/compat/macros.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-22 11:52:10 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-24 00:43:04 +0200
commita926817c81a80842a52191a7358e9bb64ab3cf80 (patch)
tree198ff643997d08e59138fdcd5110a201ac1351d6 /compat/macros.hpp
parentb0d763d032a122bbf0465fa37a2eaaff3fd3a916 (diff)
minor cleanups
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r--compat/macros.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index 465a7d24..856d2293 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -75,7 +75,7 @@ using to_const_lvalue_reference_t = remove_cvref_t<t> const&;
#define eval_once__2(expr, ident) eval_once__3(expr, ident)
#define eval_once__3(expr, ident) \
- ([&]() -> decltype(auto) { \
+ ([&]() -> decltype(auto) { \
static auto INIT##ident = (expr); \
return static_cast<to_const_lvalue_reference_t<decltype(INIT##ident)>>(INIT##ident); \
}())
@@ -96,13 +96,13 @@ constexpr cc_forceinline void static_warn<true>() {}
#define static_warning(cond) \
static_warn<(cond)>(); \
-#define typed_progn(type, ...) (([&]() -> type { __VA_ARGS__ })())
-#define progn(...) (([&]() -> decltype(auto) { __VA_ARGS__ })())
+#define typed_progn(type, ...) ([&]() -> type { __VA_ARGS__ }())
+#define progn(...) ([&]() -> decltype(auto) { __VA_ARGS__ }())
-#define prog1(x, ...) (([&]() -> to_const_lvalue_reference_t<decltype((x))> \
+#define prog1(x, ...) ([&]() -> decltype(auto) \
{ \
decltype(auto) ret1324 = (x); __VA_ARGS__; return ret1324; \
- })())
+ }())
// end c++-only macros
#endif