Boost logo

Boost :

Subject: Re: [boost] base class for boost::array
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-03-15 16:47:20


Peter Myerscough-Jackopson wrote:

> But I can't write:
>
>
>
> double sumTotal(const boost::array<double>* values)
>
> {
>
> double result = 0 ;
>
> BOOST_FOREACH(double v, values)
>
> {
>
> result += v;
>
> }
>
> return result;
>
> }

Take an iterator_range<const double*>.


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