From: Joseph Gauterin (joseph.gauterin_at_[hidden])
Date: 2008-07-01 13:05:16
I've taken a look at your patch, and it looks good. I'm happy with the
O(1 or n) nature of the change - I think the performance
characteristics are intuitive for anyone familiar with auto allocated
There's an exception safety issue that I think is worth mentioning in
the documentation: If the underlying swap function used is no-throw
then boost::swap is no-throw, but if the underlying swap function
provides the strong guarantee, then boost::swap only provides the
basic guarantee for arrays of size > 1. If an exception is thrown
halfway through the swap you'll end up with half swapped array.
(Obviously it would be nice if swaps were generally no-throw, but
that's a lot to ask - especially if the swap ends up being implemented
with a temporary and assignment).
As for putting it on the trunk - it completely slipped my mind. I'm
happy for boost::swap to move to the trunk - what kind of review
process does it need to go through? Given that the new version is only
51 lines, a full review seems like overkill.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk