PragmaTwice commented on code in PR #1032:
URL:
https://github.com/apache/incubator-kvrocks/pull/1032#discussion_r1004115594
##########
src/common/status.h:
##########
@@ -285,3 +282,10 @@ struct StatusOr {
template <typename>
friend struct StatusOr;
};
+
+#define GET_OR_RET(...) \
+ ({ \
+ auto&& status = (__VA_ARGS__); \
+ if (!status) return std::forward<decltype(status)>(status); \
+ std::forward<decltype(status)>(status); \
+ }).GetValue()
Review Comment:
> This seems like an uncommon code snippet to me. How can I read it?
We need a "template" keyword before a template member function. It is not
"uncommon".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]