summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/debug/string
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2013-09-19 13:40:29 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2013-09-19 11:40:29 +0000
commit0e1a966a86cae30717df3d1951e15dcba6d9fc98 (patch)
treedda22cef0280d0cd2800503a2218f67c3df74de7 /libstdc++-v3/include/debug/string
parent06c055fcb593011e424c7f34318e823c6dcd797f (diff)
downloadgcc-0e1a966a86cae30717df3d1951e15dcba6d9fc98.tar.gz
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-19 Marc Glisse <marc.glisse@inria.fr> 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
Diffstat (limited to 'libstdc++-v3/include/debug/string')
-rw-r--r--libstdc++-v3/include/debug/string9
1 files changed, 5 insertions, 4 deletions
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();