diff options
| author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-22 23:50:58 +0000 |
|---|---|---|
| committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-22 23:50:58 +0000 |
| commit | ffa691d93d9aac25ac7f6a33b4bf991e65ae291a (patch) | |
| tree | 9b4b064400451cc6c77580eac195d57c32849a20 /libstdc++-v3/include/bits | |
| parent | ec4310423e244c7b3ac7c17991ee09d0756102aa (diff) | |
| download | ppe42-gcc-ffa691d93d9aac25ac7f6a33b4bf991e65ae291a.tar.gz ppe42-gcc-ffa691d93d9aac25ac7f6a33b4bf991e65ae291a.zip | |
PR libstdc++/58764 (again)
* include/bits/stl_list.h (list): Make default constructor's exception
specification conditional.
* include/bits/stl_vector.h (vector): Likewise.
* testsuite/util/testsuite_allocator.h (SimpleAllocator): Add noexcept
to default constructor.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206946 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
| -rw-r--r-- | libstdc++-v3/include/bits/stl_list.h | 5 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/stl_vector.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 19bb18934e6..e014fbcd3ce 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -530,7 +530,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief Creates a %list with no elements. */ - list() _GLIBCXX_NOEXCEPT + list() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value) +#endif : _Base() { } /** diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 14284aad8ad..f4829575e73 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -246,7 +246,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief Creates a %vector with no elements. */ - vector() _GLIBCXX_NOEXCEPT : _Base() { } + vector() +#if __cplusplus >= 201103L + noexcept(is_nothrow_default_constructible<_Alloc>::value) +#endif + : _Base() { } /** * @brief Creates a %vector with no elements. |

