[OT] ISO C++ 17 changes

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 4 06:30:47 PDT 2017


On Tuesday, 4 April 2017 at 08:38:32 UTC, Walter Bright wrote:
> On 4/3/2017 11:24 AM, Meta wrote:
>> I don't know how fold expressions could be emulated in D.
>
> http://dlang.org/phobos/std_algorithm_iteration.html#.fold

Not quite the same as this is a fold over a TypeTuple/AliasSeq. 
You could of course do:

only(args).fold!"a + b"()

But the semantics are different.


More information about the Digitalmars-d mailing list