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

[expected.general] Contradictory description of expected<T, E>. #6714

Open
cassioneri opened this issue Nov 27, 2023 · 1 comment
Open

[expected.general] Contradictory description of expected<T, E>. #6714

cassioneri opened this issue Nov 27, 2023 · 1 comment

Comments

@cassioneri
Copy link
Contributor

Paragraph 1 states (emphasis added):

[...] An expected<T, E> object holds an object of type T or an object of type unexpected<E> [...]

which contradicts [expected.object.general]/1 which says (emphasis added):

Any object of type expected<T, E> either contains a value of type T or a value of type E within its own storage.

The description in [expected.general] is a leftover from the original proposal which was simplified during LWG review. The description in [expected.object.general] was fixed accordingly but the one in [expected.general] was missed.

@jwakely and @Dani-Hub might confirm.

@jwakely
Copy link
Member

jwakely commented Nov 27, 2023

Yes, the exposition-only member was originally unexpected<E> but we changed it to just E and must have missed this part.

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

No branches or pull requests

2 participants