forward_list.h: Support non-standard pointer types
authorBob Walters <bob.s.walters@gmail.com>
Tue, 11 Nov 2008 12:16:57 +0000 (12:16 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 11 Nov 2008 12:16:57 +0000 (12:16 +0000)
commit1b32e4e506aa3acd719c60d4287f30fc696a6d47
tree02bdfc783a9f079e2157f3dd8ce4bc6aed8072b3
parent8d8a4e9d3d650687dfa24d58e79fdc70d0f77173
forward_list.h: Support non-standard pointer types

2008-11-11  Bob Walters  <bob.s.walters@gmail.com>

* include/bits/forward_list.h: Support non-standard pointer types
(_Fwd_list_node_base): Add _Alloc template parameter.
(_Fwd_list_node<>): Likewise.
(_Fwd_list_iterator<>): Likewise.
(_Fwd_list_const_iterator<>): Likewise.
(_Fwd_list_node_base::_M_next, _M_transfer_after, _M_reverse_after):
Use _Alloc<_Tp>::pointer.
(_Fwd_list_iterator<>::_M_node): Use _Node_base::_Pointer.
(_Fwd_list_base<>::_M_get_node, _M_create_node, _M_create_node,
_M_insert_after, _M_put_node, _M_erase_after): Likewise.
(_Fwd_list_const_iterator<>::_M_node): use _Node_base::_Const_pointer.
(forward_list<>): Use __static_pointer_cast in place of static_cast,
and __const_pointer_cast in place of const_cast.
* include/bits/forward_list.tcc
(_Fwd_list_node<>::_M_sort_after): Using _Pointer typedefs in place
of standard pointers, __static_pointer_cast in place of static_cast.
(_Fwd_list_base<>::_Fwd_list_base, _M_insert_after, _M_erase_after):
Likewise.
(forward_list<>::_M_initialize_dispatch, _M_fill_initialize,
splice_after, remove, remove_if, merge): Likewise.
* testsuite/23_containers/forward_list/ext_pointer/modifiers/1.cc: New.
* testsuite/23_containers/forward_list/ext_pointer/modifiers/2.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/modifiers/3.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/modifiers/4.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/modifiers/5.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/1.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/2.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/3.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/4.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/5.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/6.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/operations/7.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/requirements/1.cc:
Likewise.
* testsuite/23_containers/forward_list/ext_pointer/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/23_containers/forward_list/ext_pointer/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/forward_list/ext_pointer/1.cc: Likewise.

From-SVN: r141765
19 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/forward_list.tcc
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/modifiers/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/modifiers/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/modifiers/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/modifiers/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/modifiers/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/operations/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/requirements/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/requirements/explicit_instantiation/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/ext_pointer/requirements/explicit_instantiation/3.cc [new file with mode: 0644]