how to store a range transformed by a range function?

Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 19 14:04:36 PDT 2014


Thank you. This would work, however I'm wary of a class-based 
solution. InputRangeObject.save() calls new and it appears 
opSlice is unimplemented for some technical reasons... I think 
perhaps, since my case is more specialized than the use cases 
InputRangeObject is meant for, wrapping some kind of functor in a 
struct range implementation would be equivalent to this (minus 
the heap allocations, plus slicing) for my purposes.


More information about the Digitalmars-d-learn mailing list