On Fri, Mar 25, 2011 at 2:51 PM, Rodrigo Rivas <rodrigorivasco...@gmail.com> wrote: > On Fri, Mar 25, 2011 at 7:50 PM, Gabriel Dos Reis > <g...@integrable-solutions.net> wrote: >> Boost.Range is a library component. > True, but should it ever make its way to the standard library, it
You were earlier talking about some "unified concept"; weren't you? Now, it is shifting to library component. > would be good if it is consistent with the 'range' used by the > range-for. If not, we will have two subtly different definitions of > 'range' in the language. Is that a GCC issue or a C++ issue? >> If "as it is specified in this thread" you mean option 5, > Yes. Exactly that. Option 5 does not say that we have to have a library that exactly emulates what is in in the core language. > >> If you are going to do then you are going to specify that function >> before you implement it. Are you suggesting that as an ISO C++ >> library function or a GNU extension? > > Well, I am suggesting a ISO C++ library function with the exact > semantics from option 5: if is an ISO C++ library, then the proper place is a ISO C++ committee forum. > namespace std { > pair<IT, IT> range(T &t); > } > Being IT the same type deduced by the range-for iterator. The return > value would be a pair, being the first value the begin iterator and > the second value the end. > I think that one function returning a pair instead of two functions is > better, as the 'special semantics' of the range-for, as it is in > 'Option 5', imply both begin and end together. > >>> And this is not gcc-patches@ but gcc@: "Anything relevant to the >>> development or testing of GCC and not covered by other mailing lists >>> is suitable for discussion here." >> you are right this is "gcc@". I am not sure you what you imply by the rest. > I'm merely implying that this list is suitable for this discussion. It > looked like you disagree. yes, I do. Because what you are suggesting is a change to the the ISO C++ definition. This isn't the proper place for that.