Skip to content

optional<T&&> and optional<void> for the completeness of monadic operations #119

@frederick-vs-ja

Description

@frederick-vs-ja

optional<T&&> was once proposed but withdrawn (#70). But I think it's still meaningful in monadic operations.

I guess we can re-introduce it with the construction from T&& disallowed. I think we introduce some helper functions to create them from existing optional<T> lvalues and optional<T&> values, which should avoid most dangling cases.

Additionally, optional<void> also seems to be meaningful in monadic operations (although not elsewhere).

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs paperWill need a WG21 paper to match

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions