Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monadic operations don't support member pointers #12

Open
TartanLlama opened this issue Dec 15, 2017 · 1 comment
Open

Monadic operations don't support member pointers #12

TartanLlama opened this issue Dec 15, 2017 · 1 comment

Comments

@TartanLlama
Copy link

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);
@vittorioromeo
Copy link
Owner

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants