DescriptionAdd std::unique_ptr conversions to scoped_ptr.
This is intended to allow code to gracefully move from scoped_ptr to
std::unique_ptr. Since converting from one smart pointer to another is a
destructive operation, the conversions are only permitted on rvalues.
Using it is simple:
scoped_ptr<int> s(new int(8));
std::unique_ptr<int> u(std::move(s)); // Now u owns the int.
s = std::move(u); // And now s owns the int again.
BUG=554298
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : I wish my local build wasn't randomly broken #
Total comments: 8
Patch Set 4 : Bad rebase #Patch Set 5 : Fixed rebase #Patch Set 6 : rebase #Messages
Total messages: 8 (2 generated)
|