Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-11 10:24:52

hartmutkaiser_at_[hidden] (Hartmut Kaiser) writes:

> Howard Hinnant wrote:
>> Andrei was making a point that Peter's test does not elucidate.
>> If you must modify the argument internally, then it is better
>> to pass the argument by value and modify the argument
>> directly, rather than pass by const reference, and make a
>> copy of the argument which you can then modify:
> [snipped code sample]
>> Design A saves a copy over design B when client code passes a
>> temporary.
> Sure, you're right. But this isn't the case in iterator_adaptor.
> Now, that we've agreed on the usefulness of a const reference for the
> iterator_adaptor constructor (haven't we?), should I go ahead changing it in
> the CVS?

That would be fine with me. Please change it on the release branch,
too, and update the merged_to_RC_1_31_0 tag

Dave Abrahams
Boost Consulting

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