[Webkit-unassigned] [Bug 25495] New: Implement PassOwnPtr and get replace uses of auto_ptr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 30 15:36:17 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25495

           Summary: Implement PassOwnPtr and get replace uses of auto_ptr
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
               URL: http://webkit.org/coding/RefPtr.html
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org
                CC: mjs at apple.com, darin at apple.com, koivisto at iki.fi,
                    aroben at apple.com


* SUMMARY
I think we should implement our own PassOwnPtr templates and get rid of
std::auto_ptr.

1. You can't do this with auto_ptr without getting compilation errors:

    class SomeClass;
    [...]
    virtual auto_ptr<SomeClass> createSomeClass() { return 0; }

2. When you fix the above code, it requires you do the following *and* include
the whole SomeClass.h header instead of just using a class predeclaration:

    #include "SomeClass.h"
    [...]
    virtual auto_ptr<SomeClass> createSomeClass() { return
auto_ptr<SomeClass>(); }

Lame.

3. Looking at auto_ptr and OwnPtr, you wouldn't know they're related (like
PassRefPtr and RefPtr).


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list