Skip to content

Add structured bindings compatibility #164

@ned14

Description

@ned14

For some odd reason, some odd people want to write:

[has_error, value, error] = func(...);

... where func() returns result<T, E>.

Implementing this is trivial: specialise tuple_size<basic_result<>> to return 3 and implement at<I>(). But I suspect given the dragging in of <tuple>, this support needs its own header file outside the standard set of inclusions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions