|
Boost : |
Subject: Re: [boost] Proposed interface change to boost::algorithm::copy_while
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-02-26 15:50:21
On 26 February 2013 20:36, Marshall Clow wrote:
>
> I just realized another reason not to like this.
> If your prototype looks like this:
> template<typename InputIterator, typename OutputIterator, typename Predicate>
> OutputIterator copy_while ( InputIterator &first, InputIterator last, OutputIterator result, Predicate );
>
> you can't call it like this:
> copy_while ( v.begin (), v.end (), out, pred );
But you could add the by-reference form as an overload, existing code
passing an rvalue gets the old behaviour and doesn't get the extra
information, which is OK because they never got it before now anyway.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk