Passing Appender by value
Namespace
rswhite4 at googlemail.com
Sat Jun 22 09:31:10 PDT 2013
On Saturday, 22 June 2013 at 16:08:01 UTC, Andrej Mitrovic wrote:
> 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).
What was the main reason for Walter to disable default CTors for
structs?
More information about the Digitalmars-d-learn
mailing list