Chaining struct method invocations

Bahman Movaqar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 7 07:44:07 PDT 2015


On Monday, 7 September 2015 at 14:28:06 UTC, Namespace wrote:
> On Monday, 7 September 2015 at 14:12:25 UTC, Bahman Movaqar 
> wrote:
> Structs are value types and therefore you return only a copy 
> currently.

Does this mean that in the following piece of code, what is 
passed to `add` is actually a copy of `rec1`?

    auto rec1 = SalesRecord("p10", 1.0, 10);
    coll.add(rec1);




More information about the Digitalmars-d-learn mailing list