Skip to content

Conversation

@gty404
Copy link
Contributor

@gty404 gty404 commented Apr 10, 2025

No description provided.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!


/// \brief Result alias
template <typename T, typename E = typename DefaultError<T>::type>
using Result = expected<T, E>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also add using Status = expected<void, Error>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I will uniformly modify the places where expected<void, Error> is used

Copy link
Collaborator

@zhjwpku zhjwpku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, it's Result and Status, thanks ;)

@wgtmac
Copy link
Member

wgtmac commented Apr 11, 2025

@Xuanwo @Fokko Could you help merge this? Thanks!

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The community has reached a consensus. Let's move forward!

@Xuanwo Xuanwo merged commit 0fc2a67 into apache:main Apr 11, 2025
6 checks passed
@gty404 gty404 deleted the result branch April 14, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants