]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR libstdc++/58764 (again)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Jan 2014 23:50:58 +0000 (23:50 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 Jan 2014 23:50:58 +0000 (23:50 +0000)
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.

From-SVN: r206946

12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/util/testsuite_allocator.h

index 7b8e7b644c47f3f6a8165ef6df081500fc04eb73..3d78f7859278d0ba08ee4137d779e8db231dcefc 100644 (file)
        * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
        Likewise.
 
+       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.
+
 2014-01-21  Tim Shen  <timshen91@gmail.com>
 
        * include/bits/regex.tcc: Remove incorrect `nosubs` handling.
index 19bb18934e62fb6a0a59cb1c3d2f554a7cf40b32..e014fbcd3ce887c05df8ddd81f10f8d2175b941c 100644 (file)
@@ -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() { }
 
       /**
index 14284aad8add088ec9ac7db62ad58b3f16489a66..f4829575e7340c7b9410d60b376ff7fe3798aff3 100644 (file)
@@ -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.
index fed7829193666aae81c43fe057abdf83ab4d44d5..7c29a2d8c9be6f3fc5b64f423a1dcf6e239a2b27 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1653 }
+// { dg-error "no matching" "" { target *-*-* } 1656 }
 
 #include <list>
 
index f5eae4fec95c9cfd0689f0ab283ee0119c5c2e2b..382d985c1b05363b8232bd95265814f0f16dbf55 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1605 }
+// { dg-error "no matching" "" { target *-*-* } 1608 }
 
 #include <list>
 
index e0fbe975377a833c2ecb6636c0ab1d09982cdd2a..14585af98fa48312254ea4816a33829b266547e8 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1605 }
+// { dg-error "no matching" "" { target *-*-* } 1608 }
 
 #include <list>
 #include <utility>
index 3904624a07e4b9978b3b482a2262987d49e8bef5..a9f9f305f2714d2106b6200c11511b6dde353322 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1605 }
+// { dg-error "no matching" "" { target *-*-* } 1608 }
 
 #include <list>
 
index cfbe734360106c24c24d4c6ed587956b0c8c3b97..a12b11673354115e3c1ed53daa796f816b6d0b9c 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1312 }
+// { dg-error "no matching" "" { target *-*-* } 1316 }
 
 #include <vector>
 
index 88b6e0e2d59270d92ce84aa8e8b47a69e3c647e6..b839cccc894a8b465c4bdc4eb8452e7104eecc50 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1238 }
+// { dg-error "no matching" "" { target *-*-* } 1242 }
 
 #include <vector>
 
index 94cc4ba52115ea892509ab488b75ad46431809e7..e9e966b792a81176d47fca66fde4fa235054cb15 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1238 }
+// { dg-error "no matching" "" { target *-*-* } 1242 }
 
 #include <vector>
 #include <utility>
index de61175bcfede961c88ae556178ebfa83c879947..71c6c496e2abbb048612ee51e79f9fe16c2966f1 100644 (file)
@@ -18,7 +18,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1353 }
+// { dg-error "no matching" "" { target *-*-* } 1357 }
 
 #include <vector>
 
index 2cead6699ff93b36c1d85eef98eafc95be3c1641..748557cf51c0a28351b795f7e777c6f0d9104e04 100644 (file)
@@ -454,7 +454,7 @@ namespace __gnu_test
     {
       typedef Tp value_type;
 
-      SimpleAllocator() { }
+      SimpleAllocator() noexcept { }
 
       template <class T>
         SimpleAllocator(const SimpleAllocator<T>& other) { }