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
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.

> If "as it is specified in this thread" you mean option 5,
Yes. Exactly that.

> 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:
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.

Regards.
--
Rodrigo

Reply via email to