aboutsummaryrefslogtreecommitdiff
path: root/src/util/check.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/check.h')
-rw-r--r--src/util/check.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/check.h b/src/util/check.h
index 3d534fd33e..9edf394492 100644
--- a/src/util/check.h
+++ b/src/util/check.h
@@ -54,6 +54,6 @@ T get_pure_r_value(T&& val)
}
/** Identity function. Abort if the value compares equal to zero */
-#define Assert(val) [&]() -> decltype(get_pure_r_value(val))& { auto& check = (val); assert(#val && check); return check; }()
+#define Assert(val) [&]() -> decltype(get_pure_r_value(val)) { auto&& check = (val); assert(#val && check); return std::forward<decltype(get_pure_r_value(val))>(check); }()
#endif // BITCOIN_UTIL_CHECK_H