forward ranges must offer a save() function

bearophile bearophileHUGS at lycos.com
Sat May 30 10:25:41 PDT 2009


Andrei Alexandrescu:
> If we want to allow people to create ranges that are classes (as opposed 
> to structs) the requirement for a save() function is a must. This is 
> because copying class ranges with
> Range copy = original;
> only creates a new alias for original; the two share the same state.

Do you mean a function to be called with the "dup" attribute?
Maybe such method can be called dup()?

Bye,
bearophile



More information about the Digitalmars-d mailing list