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

Feature/lambda #96

Merged
merged 20 commits into from
Oct 14, 2024
Merged

Feature/lambda #96

merged 20 commits into from
Oct 14, 2024

Conversation

joaquintides
Copy link
Member

@joaquintides joaquintides commented Oct 3, 2024

Closes #93. Points for discussion:

  • Currently, mp_bind expressions are opaque to mp_lambda. For instance, mp_lambda<mp_bind<std::pair, _1, _2>>::fn<char, int> evaluates to mp_bind<std::pair, _1, _2>. We may decide to see through mp_bind and related utilities (my personal inclination is to leave it as is).
  • Independently of the above, we can provide mp_protect (mp_quote is taken) so that, for instance, mp_lambda<mp_protect<_1>>::fn<int> evaluates to _1.

@joaquintides joaquintides marked this pull request as draft October 3, 2024 13:37
@joaquintides joaquintides marked this pull request as ready for review October 6, 2024 09:56
@pdimov
Copy link
Member

pdimov commented Oct 14, 2024

Why are you making X(_1) "work" for _1=void? There's no X(void) type, that's a C-compatible way to spell X(). This shouldn't work.

@pdimov
Copy link
Member

pdimov commented Oct 14, 2024

@joaquintides
Copy link
Member Author

joaquintides commented Oct 14, 2024

Yes, you're right, I added that as a sort of extension via lambda_devoid_args. I can easily remove it if so you wish.

@pdimov
Copy link
Member

pdimov commented Oct 14, 2024

I so wish, yes.

@pdimov pdimov merged commit ead27ca into boostorg:develop Oct 14, 2024
74 checks passed
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

Successfully merging this pull request may close these issues.

Provide lambda
2 participants