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
There need to be "auto-unwrapping" versions of
unwrap_and_functions. That is, when the callable argument returnsresult, 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 off).Below is an example of me using it to implement a custom conversion from to
boost::json::valueto a container type. Container conversion provided by Boost.JSON have a similar structure.https://godbolt.org/z/74MsK345d