diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-09 02:25:47 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-09 02:25:47 +0000 |
commit | 3e6d120bf18e6ba69373cc635e1e7dd46543ea33 (patch) | |
tree | 3353f324a4796ffc419f3468daf436866b0036fd /crypto/encryptor.cc | |
parent | d17d2fcf157bd17b810c25328a8e0960c9d1d834 (diff) | |
download | chromium_src-3e6d120bf18e6ba69373cc635e1e7dd46543ea33.zip chromium_src-3e6d120bf18e6ba69373cc635e1e7dd46543ea33.tar.gz chromium_src-3e6d120bf18e6ba69373cc635e1e7dd46543ea33.tar.bz2 |
Revert 113722 - Add Pass(), which implements move semantics, to scoped_ptr, scoped_array, and scoped_ptr_malloc.
This modification to the scopers implements the "moveable but not copyable" semantics that were introduced in C++11's unique_ptr<>.
With this, is now possible to use scopers as an argument type or a return type. This signifies, in the type system, transfer of ownership into a function or out of a function respectively. Calling, or returning such a function MUST use the temporary resulting from the scoper's Pass() function. You CANNOT just pass the scoper by copy as there is still no copy constructor or assignment operator; trying to do so will yield a compilation error.
This distinction makes it possible to avoid the implicit ownership transfer issues of auto_ptr, but still allow us to have compiler enforced ownership transfer.
Also adds a Passed() helper that allows using a scoper with Bind().
BUG=96118
TEST=new unittests
Review URL: http://codereview.chromium.org/8774032
TBR=ajwong@chromium.org
Review URL: http://codereview.chromium.org/8890060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/encryptor.cc')
0 files changed, 0 insertions, 0 deletions