From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-11-03 04:00:52
"David Abrahams" <dave_at_[hidden]> wrote in message
> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> > AFAICT, only size() needs to be specialized for integers which
> > should be easy using typetraits. So the same range class can easily
> > support both iterators and integers.
> What about floating point or rationals?
I guess that there are iterators and non-iterators.
> > Moreover, the standard uses half-open ranges of the type
> > [begin,end)
> > where 'begin' is included and 'end' is not. If the argument for not
> > the name range for the class is that many different types of ranges
> > then
> > we should consider if that is a good thing with these many ranges. IMO,
> > is not a good thing because all the ranges can be used to describe
> > eachother:
> > [begin,end] = [begin, end + 1 )
> > (begin, end) = [begin +1, end )
> > (begin, end] = [begin + 1, end + 1 )
> > To me it seems that it shall only be necessary with one type of
> > range.
> Wrong. Numerics commonly requires fully-closed and sometimes
> fully-open ranges.
please give me some examples to work with.
> > Bringing more into the picture will only bring confusion.
> Are you sure you're not already confused? ;-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk