This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Wed, Jun 11, 2008 at 2:57 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote: > Hi, > >> It seems that there are some changes required in shared_ptr >> to work with >> unique_ptr, as in: >> >> std::unique_ptr<int> uptr(new int(5)); >> >> std::shared_ptr<int> sptr = uptr; >> assert((bool)uptr == false); >> >> This way unique_ptr can substitute auto_ptr nicely. > > Yes. Actually, we have open quite a few shared_ptr proper issues too, I don't think should delay in any sense the unique_ptr work. > >> Also, maybe Paolo can confirm this, but there's an active issue >> #740 by >> Herb Sutter regarding the static array partial specialization. >> They're >> planning not to provide this partial specialization. >> >> Reference: >> http://home.twcny.rr.com/hinnant/cpp_extensions/issues_preview/lwg-active.html#740 > > Good point. The status of that issue is Ready, thus we can just immediately scratch the specializations (and maybe add a comment about that in the code, our usual practice with DRs) Removed specializations for array objects with compile time length. Comments added (btw - whats up with the _GLIBCXX_RESOLVE_LIB_DEFECTS ? I put it in because I see it with other DR notes, but I'm not sure what its used for). Also added the beginnings of a test suite. exlicit_instantiation.cc and assign.cc (although, assign still tests the compile-time length which i do believe is redundant now). > >> > I've been using your unique_ptr implementation for a while now >> and it's >> been working great so far. > > Excellent, thanks a lot for your feedback! > Paolo. > > Chris
Attachment:
unique_ptr.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |