PR libstdc++/58764 (again)

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
This commit is contained in:
Jonathan Wakely 2014-01-22 23:50:58 +00:00 committed by Jonathan Wakely
parent f34f1c878f
commit d9dcda6f48
12 changed files with 41 additions and 11 deletions

View File

@ -65,6 +65,29 @@
* 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.

View 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() { }
/**

View 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.

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@ -454,7 +454,7 @@ namespace __gnu_test
{
typedef Tp value_type;
SimpleAllocator() { }
SimpleAllocator() noexcept { }
template <class T>
SimpleAllocator(const SimpleAllocator<T>& other) { }