felipecrv commented on code in PR #33912:
URL: https://github.com/apache/arrow/pull/33912#discussion_r1091118648
##########
cpp/src/arrow/result.h:
##########
@@ -371,7 +371,7 @@ class [[nodiscard]] Result : public
util::EqualityComparable<Result<T>> {
if (ok()) {
return MoveValueUnsafe();
}
- return generate_alternative();
+ return std::forward<G>(generate_alternative)();
Review Comment:
An `enable_if` using `is_invocable_r` would restrict the calls only to
generators `G` that return `T`.
[1] https://en.cppreference.com/w/cpp/types/is_invocable
--
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]