summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-05 20:58:35 +0000
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-05 20:58:35 +0000
commit87caff8fb77dd7d7fea3f82a8a47fc65c6a23467 (patch)
treec92053601141aee3cf579cb24c61bd122f4db77d /libstdc++-v3/include
parent9cb7855ce5cfe3af083267ad4c895287606f30ba (diff)
downloadgcc-87caff8fb77dd7d7fea3f82a8a47fc65c6a23467.tar.gz
2012-10-05 François Dumont <fdumont@gcc.gnu.org>
* include/ext/throw_allocator.h (__throw_value_base): Add move semantic, not throwing. (__throw_value_limit): Likewise. (__throw_value_random): Likewise. * testsuite/util/exception/safety.h: Add validation of C++11 methods emplace/emplace_front/emplace_back/emplace_hint. * testsuite/util/testsuite_container_traits.h: Signal emplace support on deque, forward_list, list and vector. * testsuite/23_containers/deque/requirements/exception/ propagation_consistent.cc: Remove dg-do run fail. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/ext/throw_allocator.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h
index 4988f8a8a15..8942232c825 100644
--- a/libstdc++-v3/include/ext/throw_allocator.h
+++ b/libstdc++-v3/include/ext/throw_allocator.h
@@ -1,7 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2005-2012 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
@@ -467,6 +466,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
throw_value_base(const throw_value_base& __v) : _M_i(__v._M_i)
{ throw_conditionally(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // Shall not throw.
+ throw_value_base(throw_value_base&&) = default;
+#endif
+
explicit throw_value_base(const std::size_t __i) : _M_i(__i)
{ throw_conditionally(); }
#endif
@@ -479,6 +483,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // Shall not throw.
+ throw_value_base&
+ operator=(throw_value_base&&) = default;
+#endif
+
throw_value_base&
operator++()
{
@@ -568,8 +578,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
throw_value_limit(const throw_value_limit& __other)
: base_type(__other._M_i) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ throw_value_limit(throw_value_limit&&) = default;
+#endif
+
explicit throw_value_limit(const std::size_t __i) : base_type(__i) { }
#endif
+
+ throw_value_limit&
+ operator=(const throw_value_limit& __other)
+ {
+ base_type::operator=(__other);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ throw_value_limit&
+ operator=(throw_value_limit&&) = default;
+#endif
};
/// Type throwing via random condition.
@@ -583,9 +609,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
throw_value_random(const throw_value_random& __other)
: base_type(__other._M_i) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ throw_value_random(throw_value_random&&) = default;
+#endif
explicit throw_value_random(const std::size_t __i) : base_type(__i) { }
#endif
+
+ throw_value_random&
+ operator=(const throw_value_random& __other)
+ {
+ base_type::operator=(__other);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ throw_value_random&
+ operator=(throw_value_random&&) = default;
+#endif
};