Closed Bug 72039 Opened 24 years ago Closed 16 years ago

validate |std::auto_ptr| for use in mozilla

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: beard, Unassigned)

Details

(Keywords: arch)

I propose that we implement an XP version of STL's auto_ptr<T> class, say nsAutoPtr<T>, which has essentially the same semantics. This will clean up lots of code in the tree, which deals with early returns using goto's, currently a necessary evil.
c'mon scc, i double dog dare ya! now you have to do it! ;)
I don't understand what's wrong with the |auto_ptr| that's in the standard library (provided as part of <memory> or <memory.h>, not in some arbitrary `STL' header). Is |auto_ptr| known not to work? It would suck to steer people away from one of the best utilities in standard C++. The bug summary still seems appropriate if I change the task of the bug to validate |std::auto_ptr| for use in mozilla.
Status: NEW → ASSIGNED
aren't there issues with member templates?
Presumably, those compilers that have problems with member templates won't have the member template part of |std::auto_ptr| enabled. We can live without the automatic conversions these provide in this case, I think.
Keywords: mozilla1.0
Summary: XPCOM needs to provide XP auto_ptr<T> → validate |std::auto_ptr| for use in mozilla
QA Contact: kandrot → nobody
Assignee: scc → nobody
Status: ASSIGNED → NEW
QA Contact: nobody → xpcom
We have a nsAutoPtr now
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.