The monadic operations use f() syntax to call the function objects they're given. I think supporting member function/data pointers through std::invoke would be good so that users can write code like:
optional<string> s;
auto opt_size = map(s, &string::size);
I'm a little bit ambivalent about this as std::invoke is not constexpr - I would have to add an extra non-constexpr overload for member function pointers... will think about it :)
The monadic operations use
f()
syntax to call the function objects they're given. I think supporting member function/data pointers throughstd::invoke
would be good so that users can write code like: