lidavidm commented on code in PR #67:
URL: https://github.com/apache/iceberg-cpp/pull/67#discussion_r2038658755
##########
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:
We could also add `using Status = expected<void, Error>`?
--
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]