zanmato1984 commented on code in PR #46792: URL: https://github.com/apache/arrow/pull/46792#discussion_r2143811007
########## cpp/src/arrow/status.h: ########## @@ -463,13 +480,16 @@ Status& Status::operator&=(Status&& s) noexcept { } /// \endcond -namespace internal { - -// Extract Status from Status or Result<T> -// Useful for the status check macros such as RETURN_NOT_OK. -inline const Status& GenericToStatus(const Status& st) { return st; } -inline Status GenericToStatus(Status&& st) { return std::move(st); } +constexpr inline const Status& ToArrowStatus(const Status& st) { return st; } +static inline Status ToArrowStatus(Status&& st) { return st; } +namespace internal { +// A trivial wrapper so that macros don't have to namespace-quality ArrowToStatus +// (otherwise argument-dependent lookup would be disabled). +template <typename T> +Status CallToArrowStatus(T&& t) { Review Comment: This is to enable macros like `RETURN_NOT_OK()` to accept customized `ToArrowStatus()` by ADL? ########## cpp/src/arrow/status.h: ########## @@ -463,13 +480,16 @@ Status& Status::operator&=(Status&& s) noexcept { } /// \endcond -namespace internal { - -// Extract Status from Status or Result<T> -// Useful for the status check macros such as RETURN_NOT_OK. -inline const Status& GenericToStatus(const Status& st) { return st; } -inline Status GenericToStatus(Status&& st) { return std::move(st); } +constexpr inline const Status& ToArrowStatus(const Status& st) { return st; } +static inline Status ToArrowStatus(Status&& st) { return st; } +namespace internal { +// A trivial wrapper so that macros don't have to namespace-quality ArrowToStatus Review Comment: ```suggestion // A trivial wrapper so that macros don't have to namespace-qualify ArrowToStatus ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org