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]

std::ext STL (was: Re: design doc on alternative pointer support)


Phil,

I've been catching up with the libstdc++ posts.  Sorry for not
responding earlier.  If I am not mistaken, you were planning to offer
this alternative version of list<> via the use of List_switch<>, or
employ the newer g++ feature supporting nested namespaces.  So there
is no ABI issue.

I think we need to reconcile the approach.  I've reviewed the
stl_list.h.patch that you posted, and it seems like our approaches are
compatible.   You have some specific needs: one is for the container
to heap allocate everything that the alloc::pointer points to.  You
explained this before, and I agree we can standardize on that.  We
better comment why in the code.  There is no better way to handle the
need of the smart pointer, and it's a small enough price to pay.

However, after reviewing your code, I noticed all the stuff commented
out in clear(), and other commented out calls to _M_put_node
(deallocation), and I assume that is because you specifically are
working with a smart pointer.  Is this version of list<> intended to
work only with a smart pointer approach?  Have you given any thought
to how this template could be made to work in general, with any
pointer type, possibly by requiring that the allocator implement empty
destroy() and deallocate() methods to accomodate the smart pointer?

Regards,
- Bob Walters


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]