From 0e1a966a86cae30717df3d1951e15dcba6d9fc98 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 19 Sep 2013 13:40:29 +0200 Subject: re PR libstdc++/58338 (Add noexcept to functions with a narrow contract) 2013-09-19 Marc Glisse PR libstdc++/58338 * include/bits/stl_tree.h (_Rb_tree_node_base) [_S_minimum, _S_maximum]: Mark as noexcept. (_Rb_tree_iterator) [_Rb_tree_iterator, operator*, operator->, operator++, operator--, operator==, operator!=]: Likewise. (_Rb_tree_const_iterator) [_Rb_tree_const_iterator, _M_const_cast, operator*, operator->, operator++, operator--, operator==, operator!=]: Likewise. (operator==(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&), operator!=(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&)): Likewise. (_Rb_tree) [_M_put_node, _M_destroy_node, _M_root, _M_leftmost, _M_rightmost, _M_begin, _M_end, _S_left, _S_right, _S_minimum, _S_maximum]: Likewise. * include/debug/string (basic_string) [basic_string(const _Allocator&), shrink_to_fit, operator[], pop_back]: Likewise. * include/ext/vstring.h (__versa_string) [_M_limit, _M_disjunct, _M_ibegin, _M_iend, __versa_string(const _Alloc&), operator=(__versa_string&&), shrink_to_fit, operator[], front, back, assign(__versa_string&&), swap]: Likewise. (__versa_string) [__versa_string(), __versa_string(const _Alloc&)]: Merge. From-SVN: r202737 --- libstdc++-v3/include/debug/string | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libstdc++-v3/include/debug/string') diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index 9e856c1ee8c..925575e662a 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -70,6 +70,7 @@ namespace __gnu_debug // 21.3.1 construct/copy/destroy: explicit basic_string(const _Allocator& __a = _Allocator()) + _GLIBCXX_NOEXCEPT : _Base(__a) { } @@ -238,7 +239,7 @@ namespace __gnu_debug #if __cplusplus >= 201103L void - shrink_to_fit() + shrink_to_fit() noexcept { if (capacity() > size()) { @@ -267,7 +268,7 @@ namespace __gnu_debug // 21.3.4 element access: const_reference - operator[](size_type __pos) const + operator[](size_type __pos) const _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(__pos <= this->size(), _M_message(__gnu_debug::__msg_subscript_oob) @@ -278,7 +279,7 @@ namespace __gnu_debug } reference - operator[](size_type __pos) + operator[](size_type __pos) _GLIBCXX_NOEXCEPT { #ifdef _GLIBCXX_DEBUG_PEDANTIC __glibcxx_check_subscript(__pos); @@ -582,7 +583,7 @@ namespace __gnu_debug #if __cplusplus >= 201103L void - pop_back() + pop_back() noexcept { __glibcxx_check_nonempty(); _Base::pop_back(); -- cgit v1.2.1