|
Boost : |
From: Andrey Melnikov (melnikov_at_[hidden])
Date: 2005-07-16 09:24:40
David Abrahams wrote:
>
> FYI, I might tend to use a dual_state object that either yields a
> contained _reference_ or the result of invoking a function, because
> you usually don't want to pay for copy construction of a contained
> object if you don't have to, and it feels nonuniform to have
> lightweight copy only when the default is going to be used.
>
Well, I had a lot of problems with bottlenecks in VC7.0 code related to
redundant copy operations, so I'm very afraid of extra copies.
But we can have both copy- and nocopy- versions. The version with a copy
operation could be simpler to use, so the both versions have reasons to
exist.
Andrey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk