Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-08-23 13:49:25

Hello Steven,

Thursday, August 23, 2007, 7:45:27 PM, you wrote:


> Andrey Semashev <andysem <at>> writes:

>> I can. But this is a burden since it should be done for almost all
>> args I ever pass to ScopeExit. And I can easily forget to do so and
>> get subtle errors I pointed out before. So this is by no way should be
>> the default behavior.

> You can also get subtle errors if the default
> is pass by value. You will almost always want
> to pass at least one argument by reference--the
> one you modify. If you pass all arguments by
> value then you will end up only modifying the
> copy.

I have already answered to Maxim on this. The essence is that I'm not
saying that args should be passed by value by default. I'm saying that
user should state explicitly which argument is passed this or that

Best regards,
 Andrey                            mailto:andysem_at_[hidden]

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