On 17 March 2011 18:29, Rodrigo Rivas wrote: >> Actually, re-reading that and the following messages on the thread, >> I'm wrong about the lookup being independent - if it only finds a >> begin() member and no end() member it should still try to use r.end(), >> and therefore give an error. It should not be possible to use >> r.begin() and end(r) > > I think that assuring that both are read from the same place makes more sense. > Using r.begin() and end(r) is mixing two partial, possibly > incompatible interfaces to the same data, and that should not be done > silently. > > My patch does this mainly because it was easier to implement ;-). >
How about this? (only very very lightly tested)
rangefor.patch
Description: Binary data