On 2009-04-13 22:28:33 -0400, Benji Smith <dlangu...@benjismith.net> said:
Andrei Alexandrescu wrote:
Daniel Keep wrote:
Actually, I've been thinking and I realised that in 95% of cases, you
can assume a range is resumable if it has no references.
Well I'm not so sure. How about a range around an integral file handle
or socket?
If ranges can advertise their resumability, it wouldn't be hard to
write a simple template wrapper that provides resumability to an
underlying non-resumable range.
If the language supported making an struct non-copyable, you could use this.
Actually, using a class for a non-resumable range would already acheive
this (you'd only be copying references). So perhaps you could consider
a class used as a range as non-resumable, and use classes for
non-resumable ranges.
--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/