Definition of "OutputRange" insuficient
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jul 17 07:52:59 PDT 2012
On 7/17/12 6:44 AM, monarch_dodra wrote:
> I was trying to fix a few bugs in algorithm, as well as be more correct
> in template type specifiers, and I have to say: There is a serious
> restraint in the definition of an outputRange.
>
> The current definition of "isOutputRange" is simply that "an output
> range is defined functionally as a range that supports the operation put".
Actually if you look at put() it's designed to accept an input range
with assignable elements, in which case it assigns to the front and
moves forward. But I agree we could improve output ranges with a notion
of "full". The paradox is, for an input range used for output, "full" is
a synonym for "empty" :o).
Andrei
More information about the Digitalmars-d
mailing list