Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator== fails to compile if T is void #51

Open
Crzyrndm opened this issue Nov 5, 2022 · 4 comments
Open

operator== fails to compile if T is void #51

Crzyrndm opened this issue Nov 5, 2022 · 4 comments

Comments

@Crzyrndm
Copy link

Crzyrndm commented Nov 5, 2022

See https://godbolt.org/z/MvEoq4h7E

The std::expected docs for operator== cover this with the second overload I believe (T is void. No comparison is made against the "value")

@martinmoene
Copy link
Owner

martinmoene commented Nov 5, 2022

Ah, thanks!
I have no memory of having noted this special case.
Will see to incorporating it, soon-ish.

Added, note to self:

@Crzyrndm
Copy link
Author

Crzyrndm commented Nov 5, 2022

@martinmoene
Copy link
Owner

Add tests for operator==() with void 'value' type.

martinmoene added a commit that referenced this issue Nov 13, 2022
Change operator==() for non-void expected<> to align with above.
@Crzyrndm
Copy link
Author

Crzyrndm commented Mar 21, 2023

Just reviewing some old issues I created
This appears to be resolved in master (the godbolt example now works. Currently no release version created)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants