|
Boost : |
Subject: Re: [boost] [range] irange is not very eloquent
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-04-28 03:28:33
----- Original Message -----
From: "Neil Groves" <neil_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, April 28, 2010 8:45 AM
Subject: Re: [boost] [range] irange is not very eloquent
On Tue, Apr 27, 2010 at 11:55 PM, vicente.botet <vicente.botet_at_[hidden]>wrote:
> Hi,
>
> I have find the function 'irange' in the section "Provided Ranges".
>
> template<class Integer>
> integer_range< range_detail::integer_iterator<Integer> >
> irange(Integer first, Integer last);
>
> I will expect in this section ranges and not functions.
>
>
It isn't a range, it is a function. The return type is iterator_range<
range_detail::integer_iterator<Integer> >.
> This function allows to treat integers as a model of the Random Access
> Range Concept. I find the name not very eloquent. What about
> make_integer_range, for example?
>
> BTW, I don't find the documentation of the the class integer_range. Where
> it is documented?
>
>
It is documented under iterator_range.
_______________________________________________
Hi Neil,
I know that irange is a function. This why I said "I will expect in this section (Provided ranages) ranges and not functions".
You have not commented nothing related to the name.
I'm afraid, but I don't find integer_range in iterator_range section.
BTW, it is not clear from the documentation on which file are declared each one og the classes or functions. It would be great to have this information in the pages contained in the Reference section.
In Reference section maybe tou can add a Core section that will include the first 3 subsections
Overview
Synopsis
Semantics
Metafunctions
Functions
The section Utilities is out of the reference section. I suppose that this was just a nesteing error.
Utilities
Class iterator_range
Class sub_range
Function join
Aren't the new headers missing from the section "Library Headers"?
I see also some interfaces in the documentation using the range_detail namespace. For example in
template<class Integer>
integer_range< ***range_detail::integer_iterator<Integer>*** >
irange(Integer first, Integer last);
It would be better to replace this details by implementation_defined and add what are the expected behaviour, and how a user can use this types that depends on the implementation. For example how a user can assign the result of the irange fuunction to a variable?
integer_range< ??? > var = irange(0,5);
I was wondering if irange can be used with integral types as char and bool? For example,
integer_range< ??? > lower_case = irange('a','z'+1);
>From the Boost.Iterator doc. counting_iterator is a model of a random access iterator if the integral type provide the needed functions. So what is the difference between counting_range and irange functions?
It is a shame that we can not have links between different libraries, so links to the Incrementable requirements defined in Boost.Iterator can be linked from Boost.Range, or can we?
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk