[Kde-pim] Re: use of std::swap in gpgme++

Aaron J. Seigo aseigo at kde.org
Fri May 27 17:20:31 BST 2011


On Friday, May 27, 2011 18:10:39 Frank Osterfeld wrote:
> That's the copy-and-swap idiom, see e.g. [1] (I know it from [2]).
> It makes the assignment  exception-safe (std::swap must not throw).

yes, familiar with this, but didn't notice that the classes are not taking the 
rhs by reference and so creating an implicit temporary copy. meh.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110527/cf9bad84/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list