From 504a5fe6fd6fad3f577c899e37988b8cbb17244b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 26 Jun 2015 18:26:38 +0100 Subject: [PATCH] stl_bvector.h (vector::vector()): Add noexcept. * include/bits/stl_bvector.h (vector::vector()): Add noexcept. * include/bits/stl_map.h (map::map()): Likewise. * include/bits/stl_multimap.h (multimap::multimap()): Likewise. * include/bits/stl_multiset.h (multiset::multiset()): Likewise. * include/bits/stl_set.h (set::set()): Likewise. From-SVN: r225024 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/bits/stl_bvector.h | 3 +++ libstdc++-v3/include/bits/stl_map.h | 3 +++ libstdc++-v3/include/bits/stl_multimap.h | 3 +++ libstdc++-v3/include/bits/stl_multiset.h | 3 +++ libstdc++-v3/include/bits/stl_set.h | 3 +++ 6 files changed, 23 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7b7e2b9c1f5..f2cd0353ea6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2015-06-26 Jonathan Wakely + + * include/bits/stl_bvector.h (vector::vector()): Add noexcept. + * include/bits/stl_map.h (map::map()): Likewise. + * include/bits/stl_multimap.h (multimap::multimap()): Likewise. + * include/bits/stl_multiset.h (multiset::multiset()): Likewise. + * include/bits/stl_set.h (set::set()): Likewise. + 2015-06-25 Jonathan Wakely * include/bits/locale_conv.h (__do_str_codecvt): Set __count. diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index 7b93d9508cb..71bee213a86 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -573,6 +573,9 @@ template public: vector() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible::value) +#endif : _Base() { } explicit diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index df18973931e..179e3f2a0bd 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -160,6 +160,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Default constructor creates no elements. */ map() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible::value) +#endif : _M_t() { } /** diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index f3d21ab8bea..10ac0fadea8 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -158,6 +158,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Default constructor creates no elements. */ multimap() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible::value) +#endif : _M_t() { } /** diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index 7e92836aaec..0a476d1b084 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -138,6 +138,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Default constructor creates no elements. */ multiset() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible::value) +#endif : _M_t() { } /** diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index 51892343570..2e5c89f22c2 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -140,6 +140,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Default constructor creates no elements. */ set() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible::value) +#endif : _M_t() { } /** -- 2.30.2