Boost logo

Boost :

From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2008-08-27 14:48:04

David Abrahams wrote:
> on Wed Aug 27 2008, "Niels Dekker - mail address until 2008-12-31" <> wrote:
>> David Abrahams wrote:
>>> What was wrong with my proposal?
>>> You can't guarantee it will be right every time, but it's easy to
>>> correct when wrong, and that would only take a very few
>>> specializations.
>> Please note: The question is /not/ whether T has a custom swap. The
>> question is whether default-construction + swap outperforms
>> copy-construction for type T. Only in that case, it makes sense to
>> activate "Swaptimization".
> Of course. But can you come up with a type where it makes sense to have
> written a custom swap but default-construction + swap won't outperform
> copy construction? Maybe my imagination is failing me, but I can't.

Isn't this the case for the current boost::function?

Also a type could be Swappable and Assignable but not Default Constructible.


Michael Marcin

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