At Thu, 6 Jan 2011 15:17:01 +0000, Robert Jones wrote:
the final use of operator|() seems to pretty much imply eagerness in the same way that the for_each() does.
Only if you happen to know that f is a function and will be treated completely differently from the range adaptors.
Absolutely, now we're on the same page. There must be some identifiable quality of the last element of the pipeline that indicates that it is a consumer of the elements of the range. I'm unsure that any such reasonable test could be devised, which is what makes such a facility hard to write.
Oh, I'm not worried that the implementation is hard. I'm worried about humans. That idiom that has a particular syntactic->semantic relationship, and you're talking about introducing a major inconsistency. It's not necessarily horrible, but that's my concern. -- Dave Abrahams BoostPro Computing http://www.boostpro.com