Boost logo

Boost :

Subject: Re: [boost] simple range adapter
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-10-06 14:10:31

Neal Becker wrote:

> But, these don't compile:
> sum (boost::make_iterator_range<double const*> (x, x+size));
> sum (boost::make_iterator_range<double *> (x, x+size));

That's because there are different overloads of make_iterator_range.
You're not supposed to specify any template parameter, since the point
of all make_* functions is to deduce these automatically.

If you want to specify them, then use the constructor of iterator_range

> I'm stumped.
> The reason I need this, is I will need the type of range returned by
> boost::make_iterator_range (double*, double*). Apparantly, it's not
> boost::iterator_range<double*>.

make_iterator_range(double*, double*) does return an

Boost list run by bdawes at, gregod at, cpdaniel at, john at