|
Boost : |
From: Steven Watanabe (steven_at_[hidden])
Date: 2007-08-22 15:33:46
AMDG
Andrey Semashev <andysem <at> mail.ru> writes:
> Generally speaking, you are right here. But first, there are many
> objects that don't throw on copying. And second, it's not always
> possible to make a copy beforehand. See one of my previous posts for
> an example (inserting into container yelds an iterator that is to be
> used in the scope-exit block). So I think the best way is to leave the
> decision up to user.
I don't understand. Why can't you make a copy
right before the scope exit block? I think that
for ScopeExit, always passing by reference is
correct. At the very least it should be the default.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk