
23 Aug
2007
23 Aug
'07
3:45 p.m.
AMDG Andrey Semashev <andysem <at> mail.ru> 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. In Christ, Steven Watanabe