aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2010-01-01 03:38:58 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2010-01-01 03:38:58 +0000
commit3c0f2830ac9f8a97acbceb5af706d518a46250a1 (patch)
treee4291471e02a3091b05b1ec23e4ce54c7b345158 /libstdc++-v3
parentc448a85e09ecdcd100b43a9bd1a0d8d7272eb5f0 (diff)
downloadgcc-3c0f2830ac9f8a97acbceb5af706d518a46250a1.zip
gcc-3c0f2830ac9f8a97acbceb5af706d518a46250a1.tar.gz
gcc-3c0f2830ac9f8a97acbceb5af706d518a46250a1.tar.bz2
PR libstdc++/21772 part 3
2009-12-31 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 3 * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE. * testsuite/util/testsuite_container_traits.h (traits<std::map>): Add has_insert. (traits<std::multimap>): Add has_insert. (traits<std::multiset>): Add has_size_type_constructor. * testsuite/23_containers/array/requirements/exception/ generation_prohibited.cc: New. * testsuite/21_strings/basic_string/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/ext/vstring/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multimap/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/forward_list/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_set/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/vector/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/deque/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/unordered_multiset/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. * testsuite/23_containers/map/requirements/exception/ basic.cc: New. generation_prohibited.cc: New. propagation_consistent.cc: New. From-SVN: r155545
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog63
-rw-r--r--libstdc++-v3/include/ext/throw_allocator.h13
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/basic.cc41
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc54
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc42
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/requirements/exception/generation_prohibited.cc34
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/exception/basic.cc40
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/exception/generation_prohibited.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/exception/propagation_consistent.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/basic.cc40
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/generation_prohibited.cc34
-rw-r--r--libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/propagation_consistent.cc34
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/requirements/exception/basic.cc43
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/basic.cc43
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/basic.cc41
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/generation_prohibited.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/propagation_consistent.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc41
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/requirements/exception/generation_prohibited.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/requirements/exception/propagation_consistent.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/basic.cc42
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/basic.cc42
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/basic.cc42
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/basic.cc42
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/generation_prohibited.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/propagation_consistent.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc40
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/exception/generation_prohibited.cc35
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/exception/propagation_consistent.cc34
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/requirements/exception/basic.cc55
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/requirements/exception/generation_prohibited.cc52
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/requirements/exception/propagation_consistent.cc55
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_container_traits.h107
43 files changed, 1694 insertions, 57 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 434ef19..e5064a3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,68 @@
2009-12-31 Benjamin Kosnik <bkoz@redhat.com>
+ PR libstdc++/21772 part 3
+ * include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE.
+ * testsuite/util/testsuite_container_traits.h (traits<std::map>):
+ Add has_insert.
+ (traits<std::multimap>): Add has_insert.
+ (traits<std::multiset>): Add has_size_type_constructor.
+ * testsuite/23_containers/array/requirements/exception/
+ generation_prohibited.cc: New.
+ * testsuite/21_strings/basic_string/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/ext/vstring/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/unordered_map/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/multimap/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/set/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/unordered_multimap/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/forward_list/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/unordered_set/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/vector/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/deque/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/multiset/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/unordered_multiset/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+ * testsuite/23_containers/map/requirements/exception/
+ basic.cc: New.
+ generation_prohibited.cc: New.
+ propagation_consistent.cc: New.
+
+2009-12-31 Benjamin Kosnik <bkoz@redhat.com>
+
* doc/xml/manual/intro.xml: Order TR's at the end of status.
* doc/xml/manual/abi.xml: Update.
* doc/xml/manual/evolution.xml: Put in stubs.
diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h
index fd939b2..f2e7553 100644
--- a/libstdc++-v3/include/ext/throw_allocator.h
+++ b/libstdc++-v3/include/ext/throw_allocator.h
@@ -457,16 +457,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::size_t _M_i;
+#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_base() : _M_i(0)
{ throw_conditionally(); }
- throw_value_base(const throw_value_base& __v)
- : _M_i(__v._M_i)
+ throw_value_base(const throw_value_base& __v) : _M_i(__v._M_i)
{ throw_conditionally(); }
- explicit throw_value_base(const std::size_t __i)
- : _M_i(__i)
+ explicit throw_value_base(const std::size_t __i) : _M_i(__i)
{ throw_conditionally(); }
+#endif
throw_value_base&
operator=(const throw_value_base& __v)
@@ -553,17 +553,20 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return __ret;
}
+
/// Type throwing via limit condition.
struct throw_value_limit : public throw_value_base<limit_condition>
{
typedef throw_value_base<limit_condition> base_type;
+#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_limit() { }
throw_value_limit(const throw_value_limit& __other)
: base_type(__other._M_i) { }
explicit throw_value_limit(const std::size_t __i) : base_type(__i) { }
+#endif
};
/// Type throwing via random condition.
@@ -571,6 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{
typedef throw_value_base<random_condition> base_type;
+#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_random() { }
throw_value_random(const throw_value_random& __other)
@@ -578,6 +582,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
explicit throw_value_random(const std::size_t __i) : base_type(__i) { }
+#endif
};
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/basic.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/basic.cc
new file mode 100644
index 0000000..1f6b970
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/basic.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <string>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..211d7c2
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <string>
+#include <exception/safety.h>
+
+void
+char_allocator()
+{
+ typedef char value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+}
+
+void
+wchar_allocator()
+{
+ typedef wchar_t value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ // throw_allocator
+ char_allocator();
+ wchar_allocator();
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..8e27a91
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-do run { xfail *-*-* } }
+
+// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <string>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..5ecf8fb
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/array/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x -D_GLIBCXX_IS_AGGREGATE" }
+// { dg-require-cstdint "" }
+// { dg-do run { xfail *-*-* } }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <array>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef std::array<value_type, 129> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/basic.cc
new file mode 100644
index 0000000..25629c1
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/basic.cc
@@ -0,0 +1,40 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <deque>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::deque<value_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..23cde13
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-do run { xfail *-*-* } }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <deque>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::deque<value_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..1489234
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-do run { xfail *-*-* } }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <deque>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::deque<value_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/basic.cc
new file mode 100644
index 0000000..672daf8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/basic.cc
@@ -0,0 +1,40 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <forward_list>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::forward_list<value_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..7d17647
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <forward_list>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::forward_list<value_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..5c426c9
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <forward_list>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::forward_list<value_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/basic.cc
new file mode 100644
index 0000000..d51f9f2
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/basic.cc
@@ -0,0 +1,43 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
+
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..b01bba4
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..20cf5e4
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/basic.cc
new file mode 100644
index 0000000..62fba44
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/basic.cc
@@ -0,0 +1,43 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
+
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..817c3c8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..7608716
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit key_type;
+ typedef std::pair<const key_type, key_type> value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<key_type> compare_type;
+ typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/basic.cc
new file mode 100644
index 0000000..4525843
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/basic.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::multiset<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..889b106
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::multiset<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..b1dd057e
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::multiset<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc
new file mode 100644
index 0000000..d9146e3
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/basic.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::set<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..0536b99
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::set<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..dccfd3a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::less<value_type> compare_type;
+ typedef std::set<value_type, compare_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/basic.cc
new file mode 100644
index 0000000..9da9817
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/basic.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..5a3c6f8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..6399149
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/basic.cc
new file mode 100644
index 0000000..c695f9c
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/basic.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..9426e9d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..921c548
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/basic.cc
new file mode 100644
index 0000000..b0344e8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/basic.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..a0d8abb
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..b0303c1
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/basic.cc
new file mode 100644
index 0000000..6d0e3f5
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/basic.cc
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..0841cf0
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..ab1d74d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_set>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::hash<value_type> hash_type;
+ typedef std::equal_to<value_type> pred_type;
+ typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
new file mode 100644
index 0000000..a31a05a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/basic.cc
@@ -0,0 +1,40 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <exception/safety.h>
+
+void
+value()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::vector<value_type, allocator_type> test_type;
+ __gnu_test::basic_safety<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..1339280
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+// { dg-do run { xfail *-*-* } }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_random value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::vector<value_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..7487ac3
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <exception/safety.h>
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ typedef __gnu_cxx::throw_value_limit value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::vector<value_type, allocator_type> test_type;
+ __gnu_test::propagation_consistent<test_type> test;
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/requirements/exception/basic.cc b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/basic.cc
new file mode 100644
index 0000000..a0042d4
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/basic.cc
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/vstring.h>
+#include <exception/safety.h>
+
+void
+value()
+{
+#if 1
+ typedef char value_type;
+#else
+ // XXX
+ // __gnu_cxx::__rc_string_base<>::_Rep::_M_align’ with constructor
+ // not allowed in union
+ // typedef __gnu_cxx::throw_value_limit value_type;
+#endif
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+
+ typedef __gnu_cxx::__versa_string<value_type, traits_type,
+ allocator_type, __gnu_cxx::__rc_string_base> test_type_rc;
+
+ typedef __gnu_cxx::__versa_string<value_type, traits_type,
+ allocator_type, __gnu_cxx::__sso_string_base> test_type_sso;
+
+ __gnu_test::basic_safety<test_type_rc> test_rc;
+ __gnu_test::basic_safety<test_type_sso> test_sso;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/requirements/exception/generation_prohibited.cc b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/generation_prohibited.cc
new file mode 100644
index 0000000..4ffe0df
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/generation_prohibited.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/vstring.h>
+#include <exception/safety.h>
+
+void
+char_instance()
+{
+ typedef char value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef __gnu_cxx::__versa_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+}
+
+void
+wchar_instance()
+{
+ typedef wchar_t value_type;
+ typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+ typedef __gnu_cxx::__versa_string<value_type, traits_type, allocator_type> test_type;
+ __gnu_test::generation_prohibited<test_type> test;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ char_instance();
+ wchar_instance();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/requirements/exception/propagation_consistent.cc b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/propagation_consistent.cc
new file mode 100644
index 0000000..09d8618
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/requirements/exception/propagation_consistent.cc
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/vstring.h>
+#include <exception/safety.h>
+
+void
+value()
+{
+#if 1
+ typedef char value_type;
+#else
+ // XXX
+ // __gnu_cxx::__rc_string_base<>::_Rep::_M_align’ with constructor
+ // not allowed in union
+ // typedef __gnu_cxx::throw_value_limit value_type;
+#endif
+ typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
+ typedef std::char_traits<value_type> traits_type;
+
+ typedef __gnu_cxx::__versa_string<value_type, traits_type,
+ allocator_type, __gnu_cxx::__rc_string_base> test_type_rc;
+
+ typedef __gnu_cxx::__versa_string<value_type, traits_type,
+ allocator_type, __gnu_cxx::__sso_string_base> test_type_sso;
+
+ __gnu_test::propagation_consistent<test_type_rc> test_rc;
+ __gnu_test::propagation_consistent<test_type_sso> test_sso;
+}
+
+// Container requirement testing, exceptional behavior
+int main()
+{
+ value();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/util/testsuite_container_traits.h b/libstdc++-v3/testsuite/util/testsuite_container_traits.h
index 85d04c5..8e9405c 100644
--- a/libstdc++-v3/testsuite/util/testsuite_container_traits.h
+++ b/libstdc++-v3/testsuite/util/testsuite_container_traits.h
@@ -99,6 +99,45 @@ namespace __gnu_test
typedef std::true_type has_size_type_constructor;
};
+ template<typename _Tp1, typename _Tp2>
+ struct traits<std::vector<_Tp1, _Tp2>> : public traits_base
+ {
+ typedef std::true_type is_container;
+ typedef std::true_type is_reversible;
+ typedef std::true_type is_allocator_aware;
+ typedef std::true_type is_pointer_aware;
+
+ typedef std::true_type has_erase;
+ typedef std::true_type has_insert;
+ typedef std::true_type has_size_type_constructor;
+ };
+
+ template<typename _Tp1, typename _Tp2, typename _Tp3>
+ struct traits<std::basic_string<_Tp1, _Tp2, _Tp3>> : public traits_base
+ {
+ typedef std::true_type is_container;
+ typedef std::true_type is_reversible;
+ typedef std::true_type is_allocator_aware;
+ typedef std::true_type is_pointer_aware;
+
+ typedef std::true_type has_erase;
+ typedef std::true_type has_insert;
+ };
+
+ template<typename _Tp1, typename _Tp2, typename _Tp3,
+ template <typename, typename, typename> class _Tp4>
+ struct traits<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>>
+ : public traits_base
+ {
+ typedef std::true_type is_container;
+ typedef std::true_type is_reversible;
+ typedef std::true_type is_allocator_aware;
+ typedef std::true_type is_pointer_aware;
+
+ typedef std::true_type has_erase;
+ //typedef std::true_type has_insert; XXX no vstring<rc>::insert
+ };
+
template<typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4>
struct traits<std::map<_Tp1, _Tp2, _Tp3, _Tp4>> : public traits_base
{
@@ -121,6 +160,20 @@ namespace __gnu_test
typedef std::true_type is_pointer_aware;
typedef std::true_type is_associative;
typedef std::true_type is_mapped;
+
+ typedef std::true_type has_insert;
+ };
+
+ template<typename _Tp1, typename _Tp2, typename _Tp3>
+ struct traits<std::set<_Tp1, _Tp2, _Tp3>> : public traits_base
+ {
+ typedef std::true_type is_container;
+ typedef std::true_type is_reversible;
+ typedef std::true_type is_allocator_aware;
+ typedef std::true_type is_pointer_aware;
+ typedef std::true_type is_associative;
+
+ typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
@@ -147,18 +200,6 @@ namespace __gnu_test
typedef std::true_type is_adaptor;
};
- template<typename _Tp1, typename _Tp2, typename _Tp3>
- struct traits<std::set<_Tp1, _Tp2, _Tp3>> : public traits_base
- {
- typedef std::true_type is_container;
- typedef std::true_type is_reversible;
- typedef std::true_type is_allocator_aware;
- typedef std::true_type is_pointer_aware;
- typedef std::true_type is_associative;
-
- typedef std::true_type has_insert;
- };
-
template<typename _Tp1, typename _Tp2>
struct traits<std::stack<_Tp1, _Tp2> > : public traits_base
{
@@ -203,6 +244,7 @@ namespace __gnu_test
typedef std::true_type is_pointer_aware;
typedef std::true_type is_unordered;
+ typedef std::true_type has_size_type_constructor;
typedef std::true_type has_insert;
};
@@ -218,47 +260,6 @@ namespace __gnu_test
typedef std::true_type has_size_type_constructor;
typedef std::true_type has_insert;
};
-
- template<typename _Tp1, typename _Tp2>
- struct traits<std::vector<_Tp1, _Tp2>> : public traits_base
- {
- typedef std::true_type is_container;
- typedef std::true_type is_reversible;
- typedef std::true_type is_allocator_aware;
- typedef std::true_type is_pointer_aware;
-
- typedef std::true_type has_erase;
- typedef std::true_type has_insert;
- typedef std::true_type has_size_type_constructor;
- };
-
- template<typename _Tp1, typename _Tp2, typename _Tp3>
- struct traits<std::basic_string<_Tp1, _Tp2, _Tp3>> : public traits_base
- {
- typedef std::true_type is_container;
- typedef std::true_type is_reversible;
- typedef std::true_type is_allocator_aware;
- typedef std::true_type is_pointer_aware;
-
- typedef std::true_type has_erase;
- typedef std::true_type has_insert;
- };
-
- template<typename _Tp1, typename _Tp2, typename _Tp3,
- template <typename, typename, typename> class _Tp4>
- struct traits<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>>
- : public traits_base
- {
- typedef std::true_type is_container;
- typedef std::true_type is_reversible;
- typedef std::true_type is_allocator_aware;
- typedef std::true_type is_pointer_aware;
-
- typedef std::true_type has_erase;
-
- // XXX no vstring<rc>::insert
- // typedef std::true_type has_insert;
- };
} // namespace __gnu_test
#endif