Skip to content

auto-unwrapping versions of unwrap_and_ functions #142

@grisumbras

Description

@grisumbras

There need to be "auto-unwrapping" versions of unwrap_and_ functions. That is, when the callable argument returns result, the overall result should be that type (or I guess, it should have the same value type, and the error type that is a combination of the error types of the arguments and the error type of the result of f).

Below is an example of me using it to implement a custom conversion from to boost::json::value to a container type. Container conversion provided by Boost.JSON have a similar structure.

https://godbolt.org/z/74MsK345d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions