Passing Appender by value

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Jun 22 09:07:49 PDT 2013


On 6/22/13, monarch_dodra <monarchdodra at gmail.com> wrote:
> I think you can work around the problem using "appender":
> auto buffer = appender!(int[])();

Yes, because it has a default argument which it passes to the Appender
constructor. If only we had default constructors for structs in D.. or
a general solution to this issue. I remember maybe a year ago or so
I've ran into the same issue with hashes, and now it almost bit me
hard again (luckily this was caught immediately in a failing
unittest).


More information about the Digitalmars-d-learn mailing list