|
Boost Users : |
Subject: Re: [Boost-users] Boost.Ranges 2.0 algorithms accepting a const reference
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-07-08 20:16:27
Le 08/07/2010 22:30, Stefano Peluchetti a écrit :
> Hi,
>
> the Boost.Ranges (v 1.43) documentation suggests that for each
> algorithm there is a version accepting a reference to a range and a
> version accepting a const reference to a range (which in my case would
> be useful for the "non-const reference to temporary object problem"
> when dealing for example with a
> boost::iterator_range<std::vector<double>::iterator> range).
>
> However the code (take for instance the reverse algorithm) does not
> seems to include the const reference version.
>
> Am I missing something, is the documentation incorrect, or it has been
> decided against the const reference version?
reverse modifies its input, therefore it only takes a non-const range.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net