
26 Feb
2013
26 Feb
'13
8:50 p.m.
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.