Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1910: function::swap should avoid doing memory allocations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-05 15:41:45
#1910: function::swap should avoid doing memory allocations
---------------------------+------------------------------------------------
Reporter: niels_dekker | Owner: dgregor
Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: function
Version: Boost 1.35.0 | Severity: Problem
Resolution: | Keywords:
---------------------------+------------------------------------------------
Comment(by dgregor):
This patch should give a significant performance improvement for swap().
Note, however, that it does not provide the nothrow guarantee for swap()
due to the small-object optimization: small objects are still copied by
move_assign, so their constructors could throw. We may or may not want a
no-throw swap for Boost.Function, regardless of what std::(tr1::)function
say; that we can handle on-list.
I'm applying a variant of this patch to trunk now, and will close the
ticket then.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/1910#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC