diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-03 17:07:48 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-03 17:07:48 +0000 |
commit | 171a395a0a0182971d7e0135098c39cc9ab60b48 (patch) | |
tree | 3dc79fd4bce1161aa370210090c89aa751651c79 /libstdc++-v3/include/bits/deque.tcc | |
parent | dc1ff7b1f39b1e19140fd25c3d9d5257966cc7e5 (diff) | |
download | gcc-171a395a0a0182971d7e0135098c39cc9ab60b48.tar.gz |
2005-06-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/21770
* include/bits/stl_deque.h: Add concept-check. In class _Deque_base
rebind _Alloc to _Tp_alloc_type, change _Deque_impl to inherit from
the latter and add _M_get_Tp_allocator() which returns it. Use
everywhere _M_get_Tp_allocator() instead of get_allocator().
* include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator().
* include/bits/stl_list.h: Add concept-check. In class _List_base
rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which
returns the allocator (of type _Node_alloc_type) converted to
_Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of
get_allocator().
* include/bits/list.tcc: Likewise, use _M_get_Tp_allocator().
* include/bits/stl_vector.h: Add concept-check. In class _Vector_base
rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from
the latter and add _M_get_Tp_allocator() which returns it. Use
everywhere _M_get_Tp_allocator() instead of get_allocator().
* include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator().
* include/bits/stl_map.h: Add concept-check. Rebind _Alloc to
_Pair_alloc_type and use it for _Rb_tree.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to
_Key_alloc_type and use it for _Rb_tree.
* include/bits/stl_set.h: Likewise.
* include/bits/basic_string.h: Rebind _Alloc to _CharT_alloc_type and
use it for the allocator typedefs.
* testsuite/21_strings/basic_string/1.cc: New.
* testsuite/23_containers/deque/explicit_instantiation.cc: Move to...
* testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here.
* testsuite/23_containers/deque/explicit_instantiation/3.cc: New.
* testsuite/23_containers/list/explicit_instantiation.cc: Move to...
* testsuite/23_containers/list/explicit_instantiation/1.cc: ... here.
* testsuite/23_containers/list/explicit_instantiation/3.cc: New.
* testsuite/23_containers/map/explicit_instantiation.cc: Move to...
* testsuite/23_containers/map/explicit_instantiation/1.cc: ... here.
* testsuite/23_containers/map/explicit_instantiation/3.cc: New.
* testsuite/23_containers/multimap/explicit_instantiation.cc: Move to...
* testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here.
* testsuite/23_containers/multimap/explicit_instantiation/3.cc: New.
* testsuite/23_containers/multiset/explicit_instantiation.cc: Move to...
* testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here.
* testsuite/23_containers/multiset/explicit_instantiation/3.cc: New.
* testsuite/23_containers/set/explicit_instantiation.cc: Move to...
* testsuite/23_containers/set/explicit_instantiation/1.cc: .. here.
* testsuite/23_containers/set/explicit_instantiation/3.cc: New.
* testsuite/23_containers/vector/explicit_instantiation.cc: Move to...
* testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here.
* testsuite/23_containers/vector/explicit_instantiation/3.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/deque.tcc')
-rw-r--r-- | libstdc++-v3/include/bits/deque.tcc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index c5440b22419..35ceb69b402 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -147,7 +147,7 @@ namespace _GLIBCXX_STD std::copy_backward(this->_M_impl._M_start, __first, __last); iterator __new_start = this->_M_impl._M_start + __n; std::_Destroy(this->_M_impl._M_start, __new_start, - this->get_allocator()); + _M_get_Tp_allocator()); _M_destroy_nodes(this->_M_impl._M_start._M_node, __new_start._M_node); this->_M_impl._M_start = __new_start; @@ -157,7 +157,7 @@ namespace _GLIBCXX_STD std::copy(__last, this->_M_impl._M_finish, __first); iterator __new_finish = this->_M_impl._M_finish - __n; std::_Destroy(__new_finish, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); _M_destroy_nodes(__new_finish._M_node + 1, this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish = __new_finish; @@ -176,7 +176,7 @@ namespace _GLIBCXX_STD ++__node) { std::_Destroy(*__node, *__node + _S_buffer_size(), - this->get_allocator()); + _M_get_Tp_allocator()); _M_deallocate_node(*__node); } @@ -184,16 +184,16 @@ namespace _GLIBCXX_STD { std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_start._M_last, - this->get_allocator()); + _M_get_Tp_allocator()); std::_Destroy(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, - this->get_allocator()); + _M_get_Tp_allocator()); _M_deallocate_node(this->_M_impl._M_finish._M_first); } else std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_finish._M_cur, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_start; } @@ -226,7 +226,7 @@ namespace _GLIBCXX_STD { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) @@ -243,7 +243,7 @@ namespace _GLIBCXX_STD { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) @@ -269,15 +269,15 @@ namespace _GLIBCXX_STD __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), - __value, this->get_allocator()); + __value, _M_get_Tp_allocator()); std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, - __value, this->get_allocator()); + __value, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), - this->get_allocator()); + _M_get_Tp_allocator()); __throw_exception_again; } } @@ -322,18 +322,18 @@ namespace _GLIBCXX_STD _ForwardIterator __mid = __first; std::advance(__mid, _S_buffer_size()); std::__uninitialized_copy_a(__first, __mid, *__cur_node, - this->get_allocator()); + _M_get_Tp_allocator()); __first = __mid; } std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish._M_first, - this->get_allocator()); + _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), - this->get_allocator()); + _M_get_Tp_allocator()); __throw_exception_again; } } @@ -435,7 +435,7 @@ namespace _GLIBCXX_STD try { std::__uninitialized_copy_a(__first, __last, __new_start, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) @@ -452,7 +452,7 @@ namespace _GLIBCXX_STD { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) @@ -520,7 +520,7 @@ namespace _GLIBCXX_STD + difference_type(__n)); std::__uninitialized_copy_a(this->_M_impl._M_start, __start_n, __new_start, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__start_n, __pos, __old_start); fill(__pos - difference_type(__n), __pos, __x_copy); @@ -531,7 +531,7 @@ namespace _GLIBCXX_STD __pos, __new_start, this->_M_impl._M_start, __x_copy, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::fill(__old_start, __pos, __x_copy); } @@ -559,7 +559,7 @@ namespace _GLIBCXX_STD std::__uninitialized_copy_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy_backward(__pos, __finish_n, __old_finish); std::fill(__pos, __pos + difference_type(__n), __x_copy); @@ -570,7 +570,7 @@ namespace _GLIBCXX_STD __pos + difference_type(__n), __x_copy, __pos, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::fill(__pos, __old_finish, __x_copy); } @@ -607,7 +607,7 @@ namespace _GLIBCXX_STD + difference_type(__n)); std::__uninitialized_copy_a(this->_M_impl._M_start, __start_n, __new_start, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__start_n, __pos, __old_start); std::copy(__first, __last, __pos - difference_type(__n)); @@ -619,7 +619,7 @@ namespace _GLIBCXX_STD std::__uninitialized_copy_copy(this->_M_impl._M_start, __pos, __first, __mid, __new_start, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__mid, __last, __old_start); } @@ -647,7 +647,7 @@ namespace _GLIBCXX_STD std::__uninitialized_copy_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy_backward(__pos, __finish_n, __old_finish); std::copy(__first, __last, __pos); @@ -659,7 +659,7 @@ namespace _GLIBCXX_STD std::__uninitialized_copy_copy(__mid, __last, __pos, this->_M_impl._M_finish, this->_M_impl._M_finish, - this->get_allocator()); + _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy(__first, __mid, __pos); } |