diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-02 22:13:12 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-02 22:13:12 +0000 |
commit | 03a9188340bc67e1465b9bacb21b59c5256adcd9 (patch) | |
tree | 1343af66caa4366228c528e8905f255a56dad91a /libstdc++-v3 | |
parent | 5506efafe8084e3b9ecbf2f3fb05baa9cb5a1d45 (diff) | |
download | gcc-03a9188340bc67e1465b9bacb21b59c5256adcd9.tar.gz |
Use noexcept instead of _GLIBCXX_NOEXCEPT
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string::front() const, basic_string::back() const): Use
noexcept instead of _GLIBCXX_NOEXCEPT macro.
(__versa_string::front, __versa_string::back): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/vstring.h | 8 |
3 files changed, 11 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index def1789f4b6..9633f61a21e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2015-10-02 Jonathan Wakely <jwakely@redhat.com> + * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI] + (basic_string::front() const, basic_string::back() const): Use + noexcept instead of _GLIBCXX_NOEXCEPT macro. + (__versa_string::front, __versa_string::back): Likewise. + * acinclude.m4 (GLIBCXX_ENABLE_DEBUG_FLAGS): Fix comment. * include/bits/locale_conv.h [!_GLIBCXX_USE_WCHAR_T] diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index c1689af0e70..35246d945aa 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -3441,7 +3441,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT + front() const noexcept { __glibcxx_assert(!empty()); return operator[](0); @@ -3463,7 +3463,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT + back() const noexcept { __glibcxx_assert(!empty()); return operator[](this->size() - 1); diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 94af25eb597..68acd576528 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -613,7 +613,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - front() _GLIBCXX_NOEXCEPT + front() noexcept { return operator[](0); } /** @@ -621,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT + front() const noexcept { return operator[](0); } /** @@ -629,7 +629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - back() _GLIBCXX_NOEXCEPT + back() noexcept { return operator[](this->size() - 1); } /** @@ -637,7 +637,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT + back() const noexcept { return operator[](this->size() - 1); } #endif |