Supporting non-standard pointer types in STL containers
Bob Walters
bob.s.walters@gmail.com
Mon Jul 7 04:45:00 GMT 2008
> a quick feedback: any possible change in this area will go in
> mainline only. Thus, in order to allow the maintainers to further
> investigate this work, please provide the changes to stl_tree.h in
> in the form of a diff vs current mainline.
I'm posting a patch for stl_tree.h which shows the code changes needed
to support alternative pointer types. I've confirmed using the
testsuite that this set of changes created no new errors when run with
normal pointer types. The changes in this case included some work to
preserve ABI compatibility with code compiled in previous versions of
libstdc++-v3.
To test this with an alternative pointer implementation, I wrote and
used a relative_ptr<>, to confirm a case where a non-standard pointer
could work. My testing with this pointer hasn't been as exhaustive as
the regular testsuite. This alternative pointer doesn't need to
become part of libstdc++, but could be added to ext/ or to the test
suite as an example.
A pdf on google docs explains the design, and will be shared out to
this list.
Again, I appreciate any time spent looking this over, and any
suggestions, bug reports, etc.
Thanks,
- Bob Walters
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_stl_tree_h.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080707/96edec09/attachment.txt>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cast.h
Type: application/octet-stream
Size: 2816 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080707/96edec09/attachment.obj>
-------------- next part --------------
More information about the Libstdc++
mailing list