libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()
commite9a53a4f764c37b50aff68811c5d37fcd6f38adb
authorFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 12 Nov 2021 06:26:33 +0000 (12 07:26 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 14 Nov 2021 20:55:01 +0000 (14 21:55 +0100)
tree9c257b1f95249d235275f19ddeb03b9ef968c388
parent64f3e71c302b4a13e61656ee509e7050b9bce978
libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()

_GLIBCXX_DEBUG container code cleanup to get rid of _Safe_container<>::_M_safe() and just
use _Safe:: calls which use normal inheritance. Also remove several usages of _M_base()
which can be most of the time ommitted and sometimes replace with explicit _Base::
calls.

libstdc++-v3/ChangeLog:

* include/debug/safe_container.h (_Safe_container<>::_M_safe): Remove.
* include/debug/deque (deque::operator=(initializer_list<>)): Replace
_M_base() call with _Base:: call.
(deque::operator[](size_type)): Likewise.
* include/debug/forward_list (forward_list(forward_list&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(forward_list::operator=(initializer_list<>)): Remove _M_base() calls.
(forward_list::splice_after, forward_list::merge): Likewise.
* include/debug/list (list(list&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(list::operator=(initializer_list<>)): Remove _M_base() calls.
(list::splice, list::merge): Likewise.
* include/debug/map.h (map(map&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(map::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/multimap.h (multimap(multimap&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(multimap::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/set.h (set(set&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(set::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/multiset.h (multiset(multiset&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(multiset::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/string (basic_string(basic_string&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(basic_string::operator=(initializer_list<>)): Remove _M_base() call.
(basic_string::operator=(const _CharT*), basic_string::operator=(_CharT)): Likewise.
(basic_string::operator[](size_type), basic_string::operator+=(const basic_string&)):
Likewise.
(basic_string::operator+=(const _Char*), basic_string::operator+=(_CharT)): Likewise.
* include/debug/unordered_map (unordered_map(unordered_map&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_map::operator=(initializer_list<>), unordered_map::merge):
Remove _M_base() calls.
(unordered_multimap(unordered_multimap&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_multimap::operator=(initializer_list<>), unordered_multimap::merge):
Remove _M_base() calls.
* include/debug/unordered_set (unordered_set(unordered_set&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_set::operator=(initializer_list<>), unordered_set::merge):
Remove _M_base() calls.
(unordered_multiset(unordered_multiset&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_multiset::operator=(initializer_list<>), unordered_multiset::merge):
Remove _M_base() calls.
* include/debug/vector (vector(vector&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(vector::operator=(initializer_list<>)): Remove _M_base() calls.
(vector::operator[](size_type)): Likewise.
12 files changed:
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/safe_container.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/string
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector