boostorg / boostorg/system

auto-unwrapping versions of `unwrap_and_` functions

Open
#142 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
45
Forks
96
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.