My first email to Walter, ever
Nick Sabalausky
SeeWebsiteToContactMe at semitwist.com
Sun Jul 7 13:02:27 PDT 2013
On Sun, 07 Jul 2013 15:23:03 +0200
Artur Skawina <art.08.09 at gmail.com> wrote:
>
> template allSatisfy(alias F, T...) {
> enum allSatisfy = {
> foreach (E; T)
> if (!F!E)
> return false;
> return true;
> }();
> }
>
> // And no, it isn't perfect. But not /that/ much is missing.
> // It's the more complex cases that would benefit from more meta
> features.
>
It'd be even nicer when/if this becomes possible (I *think* I remember
Walter saying it was planned...):
enum allSatisfy(alias F, T...) = {
foreach (E; T)
if (!F!E)
return false;
return true;
}();
More information about the Digitalmars-d-announce
mailing list