Skip to content

Try a packed optional #6

@arBmind

Description

@arBmind

the ok() and error() methods return an std::optional<std::reference_wrapper<>>. The reference wrapper is basically a pointer that can be used like a reference. This means there is already a way to encode a not valid-state.

This is basically the idea of a packed optional.

We should try this and check if this would really help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions