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
Proposal mp_eval_and? #33
Comments
Is this the one-liner
? |
I just tried it out, the one-liner seems to work, although I don't get why. I thought the right hand side |
I have an implementation here: https://github.com/HDembinski/mp11/tree/mp_eval_and, pieced together from looking at how you do things. |
In your example, |
Ok, then my example is just bad and my understanding of your one-liner was correct at least. |
I am closing this as it seems superfluous. |
This is a combination of
mp_eval_if
andmp_and
.mp_and
already shortcuts on the first substitution failure whenmp_to_bool
is applied toT
or when the application yieldsmp_false
.mp_eval_and
would provide the same functionality for applications of meta functionsF...
onT
.mp_eval_and<T, F0, F1, ...>
ismp_false
, ifF0<T>
ismp_false
or a substitution failure. Otherwise it ismp_eval_and<T, F1, ...>
and so on.Example application for
mp_eval_and
The text was updated successfully, but these errors were encountered: