Open grisumbras opened 5 months ago
I assume the error types would need to match?
Yes, definitely.
Looks pretty good. It doesn't do the invoke thing that allows using pointers to members. Is that planned?
Also, I requested nullary function support, but now I don't remember what for.
Member function support is something I need to add to the "monadic" operators as well. I'll figure something out.
The way I see it, it should be something like
system::invoke
that invokes a callable with N (0+) arguments of which some can be results. In addition, for convenience it should invoke the callable similar to whatstd::invoke
does.Example
One interesting question is whether
result<void>
arguments should be allowed. The semantics would be to ignore them when invoking the callable, but that would complicate implementation.