0
Files
src/base
ajwong@chromium.org 1b9718f6af Allow construction and assignment of one scoped_ptr from another if the types are convertible.
This allows for depth subtyping during a move operation on a scoped_ptr. With the additional constructor and operator=, we maintain move semantics but allow a scoped_ptr<A> to be constructed from a scoped_ptr<B> if B can be converted to A.

=DEFICIENCY=
This conversion sequence will _not_ implicitly work when calling an API. Specifically, if you have
void Func(scoped_ptr<Parent> p);

  scoped_ptr<Child> c;
  Func(c.Pass()); // COMPILE ERROR

This is a limitation of C++03 move emulation.  The workaround is Func(scoped_ptr<Parent>(c.Pass());

BUG=109026
TEST=new unittests

Review URL: http://codereview.chromium.org/8968032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117317 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-11 23:10:05 +00:00
..
2012-01-10 17:55:45 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2011-11-11 16:09:31 +00:00
2011-11-11 16:09:31 +00:00
2011-08-05 15:34:00 +00:00
2011-04-04 18:04:37 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2011-11-16 00:08:08 +00:00
2011-11-16 00:08:08 +00:00
2011-03-08 02:07:29 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2011-03-31 20:52:05 +00:00
2012-01-05 02:18:18 +00:00
2011-11-16 00:08:08 +00:00
2011-11-16 00:08:08 +00:00
2011-12-13 23:59:01 +00:00
2011-08-05 15:34:00 +00:00
2011-12-21 21:16:18 +00:00
2011-12-14 18:47:26 +00:00
2011-08-05 15:34:00 +00:00
2011-09-25 03:08:13 +00:00
2011-12-02 16:14:46 +00:00
2011-12-02 16:14:46 +00:00
2011-12-02 16:14:46 +00:00
2011-08-05 15:34:00 +00:00
2010-11-12 18:00:35 +00:00
2011-03-13 21:17:20 +00:00
2011-12-02 01:32:54 +00:00
2011-07-21 08:39:51 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2011-08-05 15:34:00 +00:00
2012-01-10 00:22:35 +00:00
2011-08-03 05:28:10 +00:00
2011-11-26 01:11:44 +00:00
2011-11-26 01:11:44 +00:00
2011-11-26 01:11:44 +00:00
2011-08-05 15:34:00 +00:00