called copy constructor in foreach with ref on Range
kinke
noone at nowhere.com
Mon Jun 22 21:10:28 UTC 2020
On Monday, 22 June 2020 at 20:51:37 UTC, Jonathan M Davis wrote:
> [...]
That's why I put the struct in parantheses. Moving a class ref
makes hardly any sense, but I've also never written a *class* to
represent a range. Moving is the no-brainer solution for
transferring ownership of struct ranges and invalidating the
original instance.
More information about the Digitalmars-d-learn
mailing list