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]

forward_list patch for ext pointer support


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.

Attachment: forward_list.patch
Description: Binary data




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



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