Boost logo

Boost :

Subject: Re: [boost] AlRangeExandrescu?
From: Andrei Alexandrescu (andrei_at_[hidden])
Date: 2009-07-28 16:25:31


Neil Groves wrote:
> I'm unsure what the Boost::RangeEx::iterator would be, and why we need such
> a thing.

Without having perused either Boost::Range or Boost::RangeEx, I think
it's customary to give named access to the underlying iterator type,
just like containers e.g. define iterator, size_type etc.

> Since we have non-member functions for boost::begin(end),
> boost::end(rng) we can have ranges that model the newer concepts not
> implement the begin(), end() ,member functions.

Oh, I see (s/(end)/(rng)/ I guess). That makes sense.

> It seems that the
> pop_front(), pop_back(), operator[] map onto advance_begin(), advance_end()
> on our existing implementation of iterator_range. Currently it appears that
> the non-member functions already in Boost.RangeEx make the support for both
> the Boost.Range-esque ranges and the Alexandrescu-esque ranges possible, if
> not necessarily simple.

Perfect. But for ranges to catch up, I guess an easier to spell name
would be in order...

Andrei


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk