This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Supporting non-standard pointer types in STL containers
- From: Bob Walters <bob dot s dot walters at gmail dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Mon, 7 Jul 2008 00:45:21 -0400
- Subject: Re: Supporting non-standard pointer types in STL containers
- References: <04648ECC-429B-45C5-B90C-E539A2032857@gmail.com> <17589250.1213580044266.JavaMail.oracle@acsmt301.oracle.com>
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
Attachment:
patch_stl_tree_h.txt
Description: Text document
Attachment:
cast.h
Description: Binary data