Skip to content

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

@cassioneri

Description

@cassioneri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions