OSDN Git Service

* include/bits/stl_construct.h (_Destroy): New three-argument
authoraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jul 2004 16:37:20 +0000 (16:37 +0000)
committeraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jul 2004 16:37:20 +0000 (16:37 +0000)
commite1d16db9f02de0b077724dcead586362cffa0e5e
tree1c1e052f56fe594ac2a2f7349bea7763b2fdca24
parent31a3877c6bbad48f75f5a8b6b4fe4e7eed77ab38
* include/bits/stl_construct.h (_Destroy): New three-argument
overload that takes an allocator argument.  Another inline
three-argument overload that takes std::allocator and dispatches
to the two-argument version.
* include/bits/stl_uninitialized.h (__uninitialized_fill_n_aux):
Change return type to void to match uninitialized_fill_n.
(__uninitialized_copy_a_): New function.  Like uninitialized_copy
except that it takes an allocator and uses it for construct and
destroy.  If the allocator is std::allocator, dispatches to
uninitialized_copy.
(__uninitialized_fill_a): Likewise.
(__uninitialized_fill_n_a): Likewise.
(__uninitialized_copy_copy): Give it an allocator argument.
(__uninitialized_fill_copy): Likewise.
(__uninitialized_copy_fill): Likewise.
* include/bits/deque.tcc: Use new forms defined in stl_construct.h
and stl_uninitialized.h.  Replace use of single-argument _Construct
and _Destroy with use of allocator's construct and destroy methods.
* include/bits/list.tcc: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_tree.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/vector.tcc: Likewise.
* include/ext/hashtable.h: Use rebind so that allocator_type
has correct type for a container's allocator.  Replace use of
single-argument _Construct and _Destroy with use of allocator's
construct and destroy methods.
* include/ext/memory (__uninitialized_copy_n_a): New function.
Like uninitialized_copy_n except that it takes an extra parameter,
an allocator, and uses it for construct and destroy operations.
* include/ext/rope: Use new forms defined in stl_construct.h,
stl_uninitialized.h, and ext/memory.  Replace use of single-argument
_Construct and _Destroy with allocator construct and destroy methods.
* include/ext/ropeimpl.h: Likewise.
* include/ext/slist.h: Likewise.
* testsuite/testsuite_allocator.h (check_construct_destroy): New.
* testsuite/testsuite_allocator.cc (check_construct_destroy): New.
* testsuite/23_containers/deque/check_construct_destroy.cc: New.
* testsuite/23_containers/list/check_construct_destroy.cc: New.
* testsuite/23_containers/set/check_construct_destroy.cc: New.
* testsuite/23_containers/vector/check_construct_destroy.cc: New.
* testsuite/ext/hash_check_construct_destroy.cc: New.
* testsuite/ext/slist_check_construct_destroy.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85265 138bc75d-0d04-0410-961f-82ee72b054a4
23 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/list.tcc
libstdc++-v3/include/bits/stl_construct.h
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/stl_uninitialized.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/include/ext/hashtable.h
libstdc++-v3/include/ext/memory
libstdc++-v3/include/ext/rope
libstdc++-v3/include/ext/ropeimpl.h
libstdc++-v3/include/ext/slist
libstdc++-v3/testsuite/23_containers/deque/check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/hash_check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/slist_check_construct_destroy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/testsuite_allocator.cc
libstdc++-v3/testsuite/testsuite_allocator.h