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]

Alt pointer support for vector


Paolo,

Attached is the diff containing the alternative pointer support for vector, along with all necessary infrastructure and test cases. All of this is working.

The pointer class (_Pointer_adapter) has been deliberately given an API that resembles tr1::shared_ptr extended to include pointer arithmetic & comparison support, and so on. Let me know if anything needs to change, and feel free to change anything.

Attachment: nonstd_pointer.patch
Description: Binary data




Once this is approved, I can send up stl_tree, and will then work on the other types.


Smart pointers are a real problem in the container design, because their expectation that they point to heap allocated memory regions interferes with 'pointer as iterator' idioms like those used by vector. However, I have an approach which can support them, and will write it up when time allows.

- Bob


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