This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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)
Attachment:
rangefor.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |