wgtmac commented on code in PR #67:
URL: https://github.com/apache/iceberg-cpp/pull/67#discussion_r2038653729


##########
src/iceberg/result.h:
##########
@@ -47,4 +48,14 @@ struct ICEBERG_EXPORT [[nodiscard]] Error {
   std::string message;
 };
 
+/// /brief Default error trait
+template <typename T>
+struct DefaultError {
+  using type = Error;
+};
+
+/// \brief Result alias
+template <typename T, typename E = typename DefaultError<T>::type>
+using Result = expected<T, E>;

Review Comment:
   Should we default `T` to `void` so we can simply use `Result` as the return 
type if nothing to return?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to