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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]