C++ Logo

std-proposals

Advanced search

[std-proposals] Extend monadic operations of std::expected and std::optional by allowing taking extra arguments

From: Vitaly Fanaskov <vt4a2h_at_[hidden]>
Date: Sun, 05 Jul 2026 21:45:47 +0000
Hi everyone,

Brief description of the proposal:
This paper aims to extend monadic operations of std::expected and std::optional by allowing taking extra arguments. These arguments will be forwarded to the given function, passed after the first argument with the contained value. When applicable, the position of the contained value can be controlled using a placeholder mechanism.

Detailed description, motivation, examples, and experimental implementation:
https://github.com/vt4a2h/ipa

What do you think? Any comments and suggestions are welcome.

Cheers,
Vitaly

Received on 2026-07-05 21:45:59