forward_list patch for ext pointer support
Bob Walters
bob.s.walters@gmail.com
Mon Nov 3 04:05:00 GMT 2008
Paolo,
I'm posting the changes to forward_list which adds support for
extended pointers, as requested. This patch is dependent on the
nonstd_pointer patch. I have tested that this applies fine on top of
the nonstd_pointer.patch using patch -p0 <forward_list.patch.
All of the changes to forward_list were superficial. The Allocator
had to be added to the Fwd_list_node_base and Fwd_list_node
definitions, and to the iterators, allowing them to use the pointer
typedef in turn. Beyond that what you will see throughout the code is
the use of the pointer typedef rather than the raw pointer types, and
the use of the __static_pointer_cast in place of the normal static_cast.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forward_list.patch
Type: application/octet-stream
Size: 73867 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20081103/29bfe7f7/attachment.obj>
-------------- next part --------------
ChangeLog:
2008-11-02 Bob Walters <bob.s.walters@gmail.com>
* include/bits/forward_list.h: Support non-standard pointers
* include/bits/forward_list.tcc: Support non-standard pointers
* testsuite/23_containers/forward_list/ext_pointer/*: Add new
tests for forward_list<> using non-standard pointers via
extptr_allocator.
* include/ext/cast.h: Addd generic versions of pointer cast
functions
for pointer class types supporting a simple concept.
* include/ext/pointer.h: Removed pointer cast operators.
* include/ext/extptr_allocator.h: Added C++0X construct()
method.
Tested on Darwin-i686.
Bob
More information about the Libstdc++
mailing list