Problem with std.array(std.regex.splitter())

Jonathan M Davis jmdavisprog at gmail.com
Mon Aug 9 14:21:46 PDT 2010


On Monday, August 09, 2010 04:31:21 bearophile wrote:
> Jonathan M Davis:
> > Well, the requirement for save() being part of a forward range is fairly
> > recent, and a bunch of ranges which are supposed to be forward ranges
> > don't have them even though they're supposed to. The change was made
> > fairly close to the release of 2.047, I believe, and it was missed for
> > many ranges. It's mostly if not entirely fixed in svn. Actually, if I
> > try and compile Bearophile's code on my machine (which has a fairly
> > recent version of phobos), it compiles just fine.
> 
> I have tried the latest beta and indeed it works, thank you.
> Where can I find information about the purposes and meaning of save()?
> TDPL?
> 
> Bye,
> bearophile

save() gives you a generic way to get a copy of the range so that you can mess 
with the copy without altering the original. That way you don't have to worry 
about the different copy semantics for classes, structs, and arrays.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list