D Cookbook range save question

mark mark at qtrac.eu
Thu Jan 30 10:31:08 UTC 2020


In the D Cookbook it has as part of the FibonacciRange example:

@property FibonacciRange save() { return this; }

And in the description it says:

"...save, which returns a new range that is a copy of the current 
range and can be advanced independently..."

Why is this a *copy*? (For a copy (in C++) I'd have expected 
return *this.)


More information about the Digitalmars-d-learn mailing list