-
- Downloads
stl_construct.h (_Destroy): New three-argument overload that takes an allocator argument.
* 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. From-SVN: r85265
Showing
- libstdc++-v3/ChangeLog 47 additions, 0 deletionslibstdc++-v3/ChangeLog
- libstdc++-v3/include/bits/deque.tcc 63 additions, 38 deletionslibstdc++-v3/include/bits/deque.tcc
- libstdc++-v3/include/bits/list.tcc 1 addition, 1 deletionlibstdc++-v3/include/bits/list.tcc
- libstdc++-v3/include/bits/stl_construct.h 29 additions, 0 deletionslibstdc++-v3/include/bits/stl_construct.h
- libstdc++-v3/include/bits/stl_deque.h 8 additions, 7 deletionslibstdc++-v3/include/bits/stl_deque.h
- libstdc++-v3/include/bits/stl_list.h 3 additions, 3 deletionslibstdc++-v3/include/bits/stl_list.h
- libstdc++-v3/include/bits/stl_tree.h 2 additions, 2 deletionslibstdc++-v3/include/bits/stl_tree.h
- libstdc++-v3/include/bits/stl_uninitialized.h 122 additions, 22 deletionslibstdc++-v3/include/bits/stl_uninitialized.h
- libstdc++-v3/include/bits/stl_vector.h 22 additions, 14 deletionslibstdc++-v3/include/bits/stl_vector.h
- libstdc++-v3/include/bits/vector.tcc 87 additions, 66 deletionslibstdc++-v3/include/bits/vector.tcc
- libstdc++-v3/include/ext/hashtable.h 3 additions, 3 deletionslibstdc++-v3/include/ext/hashtable.h
- libstdc++-v3/include/ext/memory 34 additions, 0 deletionslibstdc++-v3/include/ext/memory
- libstdc++-v3/include/ext/rope 4 additions, 4 deletionslibstdc++-v3/include/ext/rope
- libstdc++-v3/include/ext/ropeimpl.h 6 additions, 4 deletionslibstdc++-v3/include/ext/ropeimpl.h
- libstdc++-v3/include/ext/slist 5 additions, 5 deletionslibstdc++-v3/include/ext/slist
- libstdc++-v3/testsuite/23_containers/deque/check_construct_destroy.cc 82 additions, 0 deletions.../testsuite/23_containers/deque/check_construct_destroy.cc
- libstdc++-v3/testsuite/23_containers/list/check_construct_destroy.cc 87 additions, 0 deletions...3/testsuite/23_containers/list/check_construct_destroy.cc
- libstdc++-v3/testsuite/23_containers/set/check_construct_destroy.cc 85 additions, 0 deletions...v3/testsuite/23_containers/set/check_construct_destroy.cc
- libstdc++-v3/testsuite/23_containers/vector/check_construct_destroy.cc 85 additions, 0 deletions...testsuite/23_containers/vector/check_construct_destroy.cc
- libstdc++-v3/testsuite/ext/hash_check_construct_destroy.cc 91 additions, 0 deletionslibstdc++-v3/testsuite/ext/hash_check_construct_destroy.cc
Loading
Please register or sign in to comment