summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-27 08:35:25 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-27 08:35:25 +0000
commitfc41dd820f53334fd95a07641cbbd733b7b9259b (patch)
treef44354f2300ceeaafa15d37492c626cbd7947142 /libstdc++-v3
parentec0b5f7df306d2cb5edc57ac08024cf114f805b5 (diff)
downloadgcc-fc41dd820f53334fd95a07641cbbd733b7b9259b.tar.gz
2011-05-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 174319 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog111
-rw-r--r--libstdc++-v3/config/abi/pre/gnu.ver7
-rw-r--r--libstdc++-v3/doc/xml/manual/documentation_hacking.xml4
-rw-r--r--libstdc++-v3/include/backward/hashtable.h15
-rw-r--r--libstdc++-v3/include/bits/c++config9
-rw-r--r--libstdc++-v3/include/bits/forward_list.h34
-rw-r--r--libstdc++-v3/include/bits/hashtable.h30
-rw-r--r--libstdc++-v3/include/bits/hashtable_policy.h4
-rw-r--r--libstdc++-v3/include/bits/random.h8
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h56
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h42
-rw-r--r--libstdc++-v3/include/bits/stl_list.h64
-rw-r--r--libstdc++-v3/include/bits/stl_map.h34
-rw-r--r--libstdc++-v3/include/bits/stl_multimap.h34
-rw-r--r--libstdc++-v3/include/bits/stl_multiset.h26
-rw-r--r--libstdc++-v3/include/bits/stl_queue.h4
-rw-r--r--libstdc++-v3/include/bits/stl_set.h26
-rw-r--r--libstdc++-v3/include/bits/stl_stack.h2
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h30
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h44
-rw-r--r--libstdc++-v3/include/debug/deque32
-rw-r--r--libstdc++-v3/include/debug/forward_list27
-rw-r--r--libstdc++-v3/include/debug/list32
-rw-r--r--libstdc++-v3/include/debug/map.h32
-rw-r--r--libstdc++-v3/include/debug/multimap.h30
-rw-r--r--libstdc++-v3/include/debug/multiset.h32
-rw-r--r--libstdc++-v3/include/debug/set.h30
-rw-r--r--libstdc++-v3/include/debug/unordered_map36
-rw-r--r--libstdc++-v3/include/debug/unordered_set38
-rw-r--r--libstdc++-v3/include/debug/vector34
-rw-r--r--libstdc++-v3/include/profile/deque32
-rw-r--r--libstdc++-v3/include/profile/forward_list6
-rw-r--r--libstdc++-v3/include/profile/list39
-rw-r--r--libstdc++-v3/include/profile/map.h31
-rw-r--r--libstdc++-v3/include/profile/multimap.h30
-rw-r--r--libstdc++-v3/include/profile/multiset.h32
-rw-r--r--libstdc++-v3/include/profile/set.h32
-rw-r--r--libstdc++-v3/include/profile/unordered_map16
-rw-r--r--libstdc++-v3/include/profile/unordered_set14
-rw-r--r--libstdc++-v3/include/profile/vector35
-rw-r--r--libstdc++-v3/include/std/chrono55
-rw-r--r--libstdc++-v3/include/std/mutex40
-rw-r--r--libstdc++-v3/include/std/thread34
-rw-r--r--libstdc++-v3/libsupc++/guard.cc30
-rw-r--r--libstdc++-v3/src/compatibility-list-2.cc20
-rw-r--r--libstdc++-v3/src/list.cc15
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc66
-rw-r--r--libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc2
-rw-r--r--libstdc++-v3/testsuite/26_numerics/complex/cons/48760_c++0x.cc1
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/19322.cc9
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/49060.cc35
-rw-r--r--libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc2
52 files changed, 863 insertions, 620 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9c1cc0396e4..af0453b45ca 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,114 @@
+2011-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * src/list.cc: Use noexcept per the FDIS.
+ * src/compatibility-list-2.cc: Likewise.
+ * include/debug/set.h: Likewise.
+ * include/debug/unordered_map: Likewise.
+ * include/debug/multiset.h: Likewise.
+ * include/debug/forward_list: Likewise.
+ * include/debug/unordered_set: Likewise.
+ * include/debug/vector: Likewise.
+ * include/debug/map.h: Likewise.
+ * include/debug/deque: Likewise.
+ * include/debug/list: Likewise.
+ * include/debug/multimap.h: Likewise.
+ * include/profile/set.h: Likewise.
+ * include/profile/unordered_map: Likewise.
+ * include/profile/multiset.h: Likewise.
+ * include/profile/forward_list: Likewise.
+ * include/profile/vector: Likewise.
+ * include/profile/unordered_set: Likewise.
+ * include/profile/map.h: Likewise.
+ * include/profile/deque: Likewise.
+ * include/profile/list: Likewise.
+ * include/profile/multimap.h: Likewise.
+ * include/bits/hashtable.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/hashtable_policy.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
+ * include/bits/forward_list.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_bvector.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+
+2011-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/stl_queue.h: Use noexcept per the FDIS.
+ * include/bits/stl_stack.h: Likewise.
+
+2011-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * config/abi/pre/gnu.ver: Correct last change, export instead
+ at the existing @3.4.16.
+ * configure.ac: Revert last change.
+ * testsuite/util/testsuite_abi.cc: Likewise.
+ * configure: Regenerate.
+
+2011-05-26 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * doc/xml/manual/documentation_hacking.xml: Minor corrections.
+
+2011-05-26 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/mutex: Add doxygen comments.
+
+2011-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * config/abi/pre/gnu.ver: Export recently added basic_streambuf
+ and basic_stringbuf symbols @3.4.17.
+ * configure.ac: Update.
+ * testsuite/util/testsuite_abi.cc: Likewise.
+ * configure: Regenerate.
+
+2011-05-26 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * libsupc++/guard.cc: Fix comments.
+
+2011-05-25 Ian Lance Taylor <iant@google.com>
+
+ PR libstdc++/49060
+ * include/backward/hashtable.h (hashtable::erase): Don't crash if
+ erasing first and another element with a reference to the other
+ element.
+ * testsuite/backward/hash_set/49060.cc: New.
+
+2011-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/random.h (random_device::min, max): Specify constexpr.
+
+2011-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/thread: Use noexcept throughout per the FDIS.
+ * include/std/mutex: Likewise.
+
+2011-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/20_util/duration/arithmetic/dr2020.cc: Fix typo.
+
+2011-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/49151
+ * include/std/chrono (operator+, operator-, operator*, operator/,
+ operator&): Implement LWG 2020 [WP]; specify constexpr.
+ * testsuite/20_util/duration/arithmetic/dr2020.cc: New.
+
+2011-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/49141
+ * testsuite/26_numerics/complex/cons/48760.cc: Use dg-require-c-std.
+ * testsuite/26_numerics/complex/cons/48760_c++0x.cc: Likewise.
+ * testsuite/26_numerics/headers/cmath/19322.cc: Likewise.
+
+2011-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/c++config (_GLIBCXX_NOTHROW): Update for noexcept.
+ * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
+ line number.
+
2011-05-23 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/37144
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 839f84669de..57744a410e5 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1270,6 +1270,13 @@ GLIBCXX_3.4.16 {
_ZNSs10_S_compareE[jmy][jmy];
_ZNSbIwSt11char_traitsIwESaIwEE10_S_compareE[jmy][jmy];
+ # basic_streambuf<>::__safe_gbump, __safe_pbump
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE12__safe_gbumpE*;
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE12__safe_pbumpE*;
+
+ # basic_stringbuf<>::_M_pbump
+ _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE8_M_pbumpE*;
+
} GLIBCXX_3.4.15;
# Symbols in the support library (libsupc++) have their own tag.
diff --git a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
index 7b2ed7c09b8..f6d7d55e04a 100644
--- a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
+++ b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
@@ -648,7 +648,7 @@
</para>
<para>
- For processing XML, an XML processor and some style
+ For processing XML, an XSLT processor and some style
sheets are necessary. Defaults are <command>xsltproc</command>
provided by <filename>libxslt</filename>.
</para>
@@ -711,7 +711,7 @@
<para>
If the Docbook stylesheets are installed in a custom location,
one can use the variable <literal>XSL_STYLE_DIR</literal> to
- over-ride the Makefile defaults. As so:
+ override the Makefile defaults. For example:
</para>
<screen>
diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
index 0bcaec4fdc2..91b0c602cec 100644
--- a/libstdc++-v3/include/backward/hashtable.h
+++ b/libstdc++-v3/include/backward/hashtable.h
@@ -898,13 +898,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__next = __cur->_M_next;
}
}
- if (_M_equals(_M_get_key(__first->_M_val), __key))
- {
- _M_buckets[__n] = __first->_M_next;
- _M_delete_node(__first);
- ++__erased;
- --_M_num_elements;
- }
+ bool __delete_first = _M_equals(_M_get_key(__first->_M_val), __key);
if (__saved_slot)
{
__next = __saved_slot->_M_next;
@@ -913,6 +907,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
++__erased;
--_M_num_elements;
}
+ if (__delete_first)
+ {
+ _M_buckets[__n] = __first->_M_next;
+ _M_delete_node(__first);
+ ++__erased;
+ --_M_num_elements;
+ }
}
return __erased;
}
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 5cb654b45b7..e8a2946dcc3 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -52,10 +52,9 @@
# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
#endif
+// See below for C++
#ifndef _GLIBCXX_NOTHROW
-# ifdef __cplusplus
-# define _GLIBCXX_NOTHROW throw()
-# else
+# ifndef __cplusplus
# define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
# endif
#endif
@@ -110,6 +109,10 @@
# endif
#endif
+#ifndef _GLIBCXX_NOTHROW
+# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT
+#endif
+
// Macro for extern template, ie controling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 39c25322817..1e242f3f760 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
void
- _M_reverse_after()
+ _M_reverse_after() noexcept
{
_Fwd_list_node_base* __tail = _M_next;
if (!__tail)
@@ -300,11 +300,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Fwd_list_node<_Tp> _Node;
_Node_alloc_type&
- _M_get_Node_allocator()
+ _M_get_Node_allocator() noexcept
{ return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
const _Node_alloc_type&
- _M_get_Node_allocator() const
+ _M_get_Node_allocator() const noexcept
{ return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
_Fwd_list_base()
@@ -644,7 +644,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Get a copy of the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const noexcept
{ return this->_M_get_Node_allocator(); }
// 23.2.3.2 iterators:
@@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in the %forward_list. Iteration is done in ordinary element order.
*/
iterator
- before_begin()
+ before_begin() noexcept
{ return iterator(&this->_M_impl._M_head); }
/**
@@ -663,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- before_begin() const
+ before_begin() const noexcept
{ return const_iterator(&this->_M_impl._M_head); }
/**
@@ -671,7 +671,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in the %forward_list. Iteration is done in ordinary element order.
*/
iterator
- begin()
+ begin() noexcept
{ return iterator(this->_M_impl._M_head._M_next); }
/**
@@ -680,7 +680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(this->_M_impl._M_head._M_next); }
/**
@@ -689,7 +689,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
iterator
- end()
+ end() noexcept
{ return iterator(0); }
/**
@@ -698,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(0); }
/**
@@ -707,7 +707,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(this->_M_impl._M_head._M_next); }
/**
@@ -716,7 +716,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- cbefore_begin() const
+ cbefore_begin() const noexcept
{ return const_iterator(&this->_M_impl._M_head); }
/**
@@ -725,7 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* ordinary element order.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(0); }
/**
@@ -733,14 +733,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* equal end().)
*/
bool
- empty() const
+ empty() const noexcept
{ return this->_M_impl._M_head._M_next == 0; }
/**
* Returns the largest possible size of %forward_list.
*/
size_type
- max_size() const
+ max_size() const noexcept
{ return this->_M_get_Node_allocator().max_size(); }
// 23.2.3.3 element access:
@@ -1021,7 +1021,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Managing the pointer is the user's responsibility.
*/
void
- clear()
+ clear() noexcept
{ this->_M_erase_after(&this->_M_impl._M_head, 0); }
// 23.2.3.5 forward_list operations:
@@ -1196,7 +1196,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Reverse the order of elements in the list in linear time.
*/
void
- reverse()
+ reverse() noexcept
{ this->_M_impl._M_head._M_reverse_after(); }
private:
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index f284126e247..fd6bc32b0d8 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -239,43 +239,43 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Basic container operations
iterator
- begin()
+ begin() noexcept
{ return iterator(_M_buckets + _M_begin_bucket_index); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_M_buckets + _M_begin_bucket_index); }
iterator
- end()
+ end() noexcept
{ return iterator(_M_buckets + _M_bucket_count); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_M_buckets + _M_bucket_count); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_M_buckets + _M_begin_bucket_index); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_M_buckets + _M_bucket_count); }
size_type
- size() const
+ size() const noexcept
{ return _M_element_count; }
bool
- empty() const
+ empty() const noexcept
{ return size() == 0; }
allocator_type
- get_allocator() const
+ get_allocator() const noexcept
{ return allocator_type(_M_node_allocator); }
size_type
- max_size() const
+ max_size() const noexcept
{ return _M_node_allocator.max_size(); }
// Observers
@@ -287,11 +287,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Bucket operations
size_type
- bucket_count() const
+ bucket_count() const noexcept
{ return _M_bucket_count; }
size_type
- max_bucket_count() const
+ max_bucket_count() const noexcept
{ return max_size(); }
size_type
@@ -331,7 +331,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return const_local_iterator(0); }
float
- load_factor() const
+ load_factor() const noexcept
{
return static_cast<float>(size()) / static_cast<float>(bucket_count());
}
@@ -447,7 +447,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
erase(const_iterator, const_iterator);
void
- clear();
+ clear() noexcept;
// Set number of buckets to be appropriate for container of n element.
void rehash(size_type __n);
@@ -1167,7 +1167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
- clear()
+ clear() noexcept
{
_M_deallocate_nodes(_M_buckets, _M_bucket_count);
_M_element_count = 0;
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index f6e187616ee..3a22e9ac5c9 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -391,7 +391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_max_load_factor(__z), _M_growth_factor(2.f), _M_next_resize(0) { }
float
- max_load_factor() const
+ max_load_factor() const noexcept
{ return _M_max_load_factor; }
// Return a bucket size no smaller than n.
@@ -615,7 +615,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Rehash_base<_Prime_rehash_policy, _Hashtable>
{
float
- max_load_factor() const
+ max_load_factor() const noexcept
{
const _Hashtable* __this = static_cast<const _Hashtable*>(this);
return __this->__rehash_policy().max_load_factor();
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index f8f7ce9522e..f259f1563de 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -1544,12 +1544,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
- result_type
- min() const
+ static constexpr result_type
+ min()
{ return std::numeric_limits<result_type>::min(); }
- result_type
- max() const
+ static constexpr result_type
+ max()
{ return std::numeric_limits<result_type>::max(); }
double
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 3cd53e7fad7..47156418509 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -74,13 +74,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Bit_reference(_Bit_type * __x, _Bit_type __y)
: _M_p(__x), _M_mask(__y) { }
- _Bit_reference() : _M_p(0), _M_mask(0) { }
+ _Bit_reference() _GLIBCXX_NOEXCEPT : _M_p(0), _M_mask(0) { }
- operator bool() const
+ operator bool() const _GLIBCXX_NOEXCEPT
{ return !!(*_M_p & _M_mask); }
_Bit_reference&
- operator=(bool __x)
+ operator=(bool __x) _GLIBCXX_NOEXCEPT
{
if (__x)
*_M_p |= _M_mask;
@@ -90,7 +90,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
_Bit_reference&
- operator=(const _Bit_reference& __x)
+ operator=(const _Bit_reference& __x) _GLIBCXX_NOEXCEPT
{ return *this = bool(__x); }
bool
@@ -102,7 +102,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return !bool(*this) && bool(__x); }
void
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{ *_M_p ^= _M_mask; }
};
@@ -398,15 +398,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Alloc allocator_type;
_Bit_alloc_type&
- _M_get_Bit_allocator()
+ _M_get_Bit_allocator() _GLIBCXX_NOEXCEPT
{ return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
const _Bit_alloc_type&
- _M_get_Bit_allocator() const
+ _M_get_Bit_allocator() const _GLIBCXX_NOEXCEPT
{ return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(_M_get_Bit_allocator()); }
_Bvector_base()
@@ -612,61 +612,61 @@ template<typename _Alloc>
#endif
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_start; }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_start; }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish; }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish; }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return this->_M_impl._M_start; }
const_iterator
- cend() const
+ cend() const noexcept
{ return this->_M_impl._M_finish; }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return size_type(end() - begin()); }
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{
const size_type __isize =
__gnu_cxx::__numeric_traits<difference_type>::__max
@@ -677,12 +677,12 @@ template<typename _Alloc>
}
size_type
- capacity() const
+ capacity() const _GLIBCXX_NOEXCEPT
{ return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
- begin()); }
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return begin() == end(); }
reference
@@ -741,7 +741,7 @@ template<typename _Alloc>
// here due to the way we are implementing DR 464 in the debug-mode
// vector class.
void
- data() { }
+ data() _GLIBCXX_NOEXCEPT { }
void
push_back(bool __x)
@@ -768,7 +768,7 @@ template<typename _Alloc>
// [23.2.5]/1, third-to-last entry in synopsis listing
static void
- swap(reference __x, reference __y)
+ swap(reference __x, reference __y) _GLIBCXX_NOEXCEPT
{
bool __tmp = __x;
__x = __y;
@@ -841,7 +841,7 @@ template<typename _Alloc>
#endif
void
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
for (_Bit_type * __p = this->_M_impl._M_start._M_p;
__p != this->_M_impl._M_end_of_storage; ++__p)
@@ -849,7 +849,7 @@ template<typename _Alloc>
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_erase_at_end(begin()); }
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 0d9b5b44cb9..209287b56fc 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -441,7 +441,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Alloc allocator_type;
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(_M_get_Tp_allocator()); }
typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
@@ -508,15 +508,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
};
_Tp_alloc_type&
- _M_get_Tp_allocator()
+ _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
{ return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
const _Tp_alloc_type&
- _M_get_Tp_allocator() const
+ _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
_Map_alloc_type
- _M_get_map_allocator() const
+ _M_get_map_allocator() const _GLIBCXX_NOEXCEPT
{ return _Map_alloc_type(_M_get_Tp_allocator()); }
_Tp*
@@ -997,7 +997,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Get a copy of the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _Base::get_allocator(); }
// iterators
@@ -1006,7 +1006,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* %deque. Iteration is done in ordinary element order.
*/
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_start; }
/**
@@ -1014,7 +1014,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element in the %deque. Iteration is done in ordinary element order.
*/
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_start; }
/**
@@ -1023,7 +1023,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish; }
/**
@@ -1032,7 +1032,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* ordinary element order.
*/
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish; }
/**
@@ -1041,7 +1041,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->_M_impl._M_finish); }
/**
@@ -1050,7 +1050,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* reverse element order.
*/
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->_M_impl._M_finish); }
/**
@@ -1059,7 +1059,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in reverse element order.
*/
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->_M_impl._M_start); }
/**
@@ -1068,7 +1068,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* done in reverse element order.
*/
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->_M_impl._M_start); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -1077,7 +1077,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element in the %deque. Iteration is done in ordinary element order.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return this->_M_impl._M_start; }
/**
@@ -1086,7 +1086,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* ordinary element order.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return this->_M_impl._M_finish; }
/**
@@ -1095,7 +1095,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* reverse element order.
*/
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(this->_M_impl._M_finish); }
/**
@@ -1104,19 +1104,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* done in reverse element order.
*/
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(this->_M_impl._M_start); }
#endif
// [23.2.1.2] capacity
/** Returns the number of elements in the %deque. */
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish - this->_M_impl._M_start; }
/** Returns the size() of the largest possible %deque. */
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Tp_allocator().max_size(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -1197,7 +1197,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* equal end().)
*/
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_finish == this->_M_impl._M_start; }
// element access
@@ -1576,7 +1576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_erase_at_end(begin()); }
protected:
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index 126de00b3b0..5144bb67e7b 100644
--- a/libstdc++-v3/include/bits/stl_list.h
+++ b/libstdc++-v3/include/bits/stl_list.h
@@ -77,22 +77,22 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_List_node_base* _M_next;
_List_node_base* _M_prev;
-
+
static void
- swap(_List_node_base& __x, _List_node_base& __y) throw ();
-
+ swap(_List_node_base& __x, _List_node_base& __y) _GLIBCXX_USE_NOEXCEPT;
+
void
_M_transfer(_List_node_base* const __first,
- _List_node_base* const __last) throw ();
-
+ _List_node_base* const __last) _GLIBCXX_USE_NOEXCEPT;
+
void
- _M_reverse() throw ();
-
+ _M_reverse() _GLIBCXX_USE_NOEXCEPT;
+
void
- _M_hook(_List_node_base* const __position) throw ();
-
+ _M_hook(_List_node_base* const __position) _GLIBCXX_USE_NOEXCEPT;
+
void
- _M_unhook() throw ();
+ _M_unhook() _GLIBCXX_USE_NOEXCEPT;
};
_GLIBCXX_END_NAMESPACE_VERSION
@@ -334,19 +334,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Alloc allocator_type;
_Node_alloc_type&
- _M_get_Node_allocator()
+ _M_get_Node_allocator() _GLIBCXX_NOEXCEPT
{ return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
const _Node_alloc_type&
- _M_get_Node_allocator() const
+ _M_get_Node_allocator() const _GLIBCXX_NOEXCEPT
{ return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
_Tp_alloc_type
- _M_get_Tp_allocator() const
+ _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
{ return _Tp_alloc_type(_M_get_Node_allocator()); }
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(_M_get_Node_allocator()); }
_List_base()
@@ -718,7 +718,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Get a copy of the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _Base::get_allocator(); }
// iterators
@@ -727,7 +727,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* %list. Iteration is done in ordinary element order.
*/
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(this->_M_impl._M_node._M_next); }
/**
@@ -736,7 +736,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(this->_M_impl._M_node._M_next); }
/**
@@ -745,7 +745,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* order.
*/
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(&this->_M_impl._M_node); }
/**
@@ -754,7 +754,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(&this->_M_impl._M_node); }
/**
@@ -763,7 +763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* order.
*/
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
/**
@@ -772,7 +772,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
/**
@@ -781,7 +781,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* reverse element order.
*/
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
/**
@@ -790,7 +790,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -800,7 +800,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(this->_M_impl._M_node._M_next); }
/**
@@ -809,7 +809,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(&this->_M_impl._M_node); }
/**
@@ -818,7 +818,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
/**
@@ -827,7 +827,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -837,17 +837,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* end().)
*/
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
/** Returns the number of elements in the %list. */
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return std::distance(begin(), end()); }
/** Returns the size() of the largest possible %list. */
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Node_allocator().max_size(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -1192,7 +1192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Managing the pointer is the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_Base::_M_clear();
_Base::_M_init();
@@ -1412,7 +1412,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Reverse the order of elements in the list in linear time.
*/
void
- reverse()
+ reverse() _GLIBCXX_NOEXCEPT
{ this->_M_impl._M_node._M_reverse(); }
/**
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index a84b4b61dfb..49341c998de 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -296,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Get a copy of the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _M_t.get_allocator(); }
// iterators
@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Iteration is done in ascending order according to the keys.
*/
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -315,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -324,7 +324,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -333,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the keys.
*/
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -342,7 +342,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -351,7 +351,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -360,7 +360,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
/**
@@ -369,7 +369,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* order according to the keys.
*/
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -379,7 +379,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return _M_t.begin(); }
/**
@@ -388,7 +388,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the keys.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return _M_t.end(); }
/**
@@ -397,7 +397,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return _M_t.rbegin(); }
/**
@@ -406,7 +406,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* order according to the keys.
*/
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return _M_t.rend(); }
#endif
@@ -415,17 +415,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* end().)
*/
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return _M_t.empty(); }
/** Returns the size of the %map. */
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _M_t.size(); }
/** Returns the maximum size of the %map. */
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_t.max_size(); }
// [23.3.1.2] element access
@@ -700,7 +700,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* Managing the pointer is the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_t.clear(); }
// observers
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h
index ca37f359e1b..bc677262a32 100644
--- a/libstdc++-v3/include/bits/stl_multimap.h
+++ b/libstdc++-v3/include/bits/stl_multimap.h
@@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Get a copy of the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _M_t.get_allocator(); }
// iterators
@@ -303,7 +303,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -312,7 +312,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the keys.
*/
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -321,7 +321,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -330,7 +330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -339,7 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* keys.
*/
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
/**
@@ -366,7 +366,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* descending order according to the keys.
*/
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -376,7 +376,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the keys.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return _M_t.begin(); }
/**
@@ -385,7 +385,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return _M_t.end(); }
/**
@@ -394,7 +394,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return _M_t.rbegin(); }
/**
@@ -403,24 +403,24 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* descending order according to the keys.
*/
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return _M_t.rend(); }
#endif
// capacity
/** Returns true if the %multimap is empty. */
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return _M_t.empty(); }
/** Returns the size of the %multimap. */
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _M_t.size(); }
/** Returns the maximum size of the %multimap. */
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_t.max_size(); }
// modifiers
@@ -625,7 +625,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* is the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_t.clear(); }
// observers
diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h
index 9a48916c3c3..c3e686adeb1 100644
--- a/libstdc++-v3/include/bits/stl_multiset.h
+++ b/libstdc++-v3/include/bits/stl_multiset.h
@@ -275,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return _M_t.key_comp(); }
/// Returns the memory allocation object.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _M_t.get_allocator(); }
/**
@@ -284,7 +284,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -302,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -311,7 +311,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -321,7 +321,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
iterator
- cbegin() const
+ cbegin() const noexcept
{ return _M_t.begin(); }
/**
@@ -330,7 +330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
iterator
- cend() const
+ cend() const noexcept
{ return _M_t.end(); }
/**
@@ -339,7 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return _M_t.rbegin(); }
/**
@@ -348,23 +348,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- crend() const
+ crend() const noexcept
{ return _M_t.rend(); }
#endif
/// Returns true if the %set is empty.
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return _M_t.empty(); }
/// Returns the size of the %set.
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _M_t.size(); }
/// Returns the maximum size of the %set.
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_t.max_size(); }
/**
@@ -554,7 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* is the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_t.clear(); }
// multiset operations:
diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h
index 5f20072b62f..caa8599af27 100644
--- a/libstdc++-v3/include/bits/stl_queue.h
+++ b/libstdc++-v3/include/bits/stl_queue.h
@@ -243,6 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
swap(queue& __q)
+ noexcept(noexcept(swap(c, __q.c)))
{
using std::swap;
swap(c, __q.c);
@@ -312,6 +313,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Seq>
inline void
swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
template<typename _Tp, typename _Seq, typename _Alloc>
@@ -530,6 +532,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
swap(priority_queue& __pq)
+ noexcept(noexcept(swap(c, __pq.c)) && noexcept(swap(comp, __pq.comp)))
{
using std::swap;
swap(c, __pq.c);
@@ -545,6 +548,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline void
swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
priority_queue<_Tp, _Sequence, _Compare>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
template<typename _Tp, typename _Sequence, typename _Compare,
diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h
index 77d0f8022c3..aa89a8a21cb 100644
--- a/libstdc++-v3/include/bits/stl_set.h
+++ b/libstdc++-v3/include/bits/stl_set.h
@@ -282,7 +282,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return _M_t.key_comp(); }
/// Returns the allocator object with which the %set was constructed.
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return _M_t.get_allocator(); }
/**
@@ -291,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return _M_t.begin(); }
/**
@@ -300,7 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return _M_t.end(); }
/**
@@ -309,7 +309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return _M_t.rbegin(); }
/**
@@ -318,7 +318,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -328,7 +328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
iterator
- cbegin() const
+ cbegin() const noexcept
{ return _M_t.begin(); }
/**
@@ -337,7 +337,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
iterator
- cend() const
+ cend() const noexcept
{ return _M_t.end(); }
/**
@@ -346,7 +346,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* to the keys.
*/
reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return _M_t.rbegin(); }
/**
@@ -355,23 +355,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* according to the keys.
*/
reverse_iterator
- crend() const
+ crend() const noexcept
{ return _M_t.rend(); }
#endif
/// Returns true if the %set is empty.
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return _M_t.empty(); }
/// Returns the size of the %set.
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _M_t.size(); }
/// Returns the maximum size of the %set.
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_t.max_size(); }
/**
@@ -569,7 +569,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_t.clear(); }
// set operations:
diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h
index 73c8bbd5d46..06659696b19 100644
--- a/libstdc++-v3/include/bits/stl_stack.h
+++ b/libstdc++-v3/include/bits/stl_stack.h
@@ -217,6 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
swap(stack& __s)
+ noexcept(noexcept(swap(c, __s.c)))
{
using std::swap;
swap(c, __s.c);
@@ -287,6 +288,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Seq>
inline void
swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
template<typename _Tp, typename _Seq, typename _Alloc>
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 85681d2da36..7ba6061a674 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -352,15 +352,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef _Alloc allocator_type;
_Node_allocator&
- _M_get_Node_allocator()
+ _M_get_Node_allocator() _GLIBCXX_NOEXCEPT
{ return *static_cast<_Node_allocator*>(&this->_M_impl); }
const _Node_allocator&
- _M_get_Node_allocator() const
+ _M_get_Node_allocator() const _GLIBCXX_NOEXCEPT
{ return *static_cast<const _Node_allocator*>(&this->_M_impl); }
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(_M_get_Node_allocator()); }
protected:
@@ -647,56 +647,56 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return _M_impl._M_key_compare; }
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{
return iterator(static_cast<_Link_type>
(this->_M_impl._M_header._M_left));
}
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{
return const_iterator(static_cast<_Const_Link_type>
(this->_M_impl._M_header._M_left));
}
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{
return const_iterator(static_cast<_Const_Link_type>
(&this->_M_impl._M_header));
}
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return _M_impl._M_node_count == 0; }
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return _M_impl._M_node_count; }
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Node_allocator().max_size(); }
void
@@ -794,7 +794,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
erase(const key_type* __first, const key_type* __last);
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_M_erase(_M_begin());
_M_leftmost() = _M_end();
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 5f71aa5cd00..40770b1cd5a 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -92,15 +92,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Alloc allocator_type;
_Tp_alloc_type&
- _M_get_Tp_allocator()
+ _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
{ return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
const _Tp_alloc_type&
- _M_get_Tp_allocator() const
+ _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
allocator_type
- get_allocator() const
+ get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(_M_get_Tp_allocator()); }
_Vector_base()
@@ -460,7 +460,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(this->_M_impl._M_start); }
/**
@@ -469,7 +469,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(this->_M_impl._M_start); }
/**
@@ -478,7 +478,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(this->_M_impl._M_finish); }
/**
@@ -487,7 +487,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* ordinary element order.
*/
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(this->_M_impl._M_finish); }
/**
@@ -496,7 +496,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
/**
@@ -505,7 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* reverse element order.
*/
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
/**
@@ -514,7 +514,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in reverse element order.
*/
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
/**
@@ -523,7 +523,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* is done in reverse element order.
*/
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -533,7 +533,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* element order.
*/
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(this->_M_impl._M_start); }
/**
@@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* ordinary element order.
*/
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(this->_M_impl._M_finish); }
/**
@@ -551,7 +551,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* reverse element order.
*/
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
/**
@@ -560,19 +560,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* is done in reverse element order.
*/
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
// [23.2.4.2] capacity
/** Returns the number of elements in the %vector. */
size_type
- size() const
+ size() const _GLIBCXX_NOEXCEPT
{ return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
/** Returns the size() of the largest possible %vector. */
size_type
- max_size() const
+ max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Tp_allocator().max_size(); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -647,7 +647,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* hold before needing to allocate more memory.
*/
size_type
- capacity() const
+ capacity() const _GLIBCXX_NOEXCEPT
{ return size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_start); }
@@ -656,7 +656,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* equal end().)
*/
bool
- empty() const
+ empty() const _GLIBCXX_NOEXCEPT
{ return begin() == end(); }
/**
@@ -800,7 +800,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#else
pointer
#endif
- data()
+ data() _GLIBCXX_NOEXCEPT
{ return std::__addressof(front()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -808,7 +808,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#else
const_pointer
#endif
- data() const
+ data() const _GLIBCXX_NOEXCEPT
{ return std::__addressof(front()); }
// [23.2.4.3] modifiers
@@ -1036,7 +1036,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* the user's responsibility.
*/
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _M_erase_at_end(this->_M_impl._M_start); }
protected:
diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque
index ee17f204132..1756328e4e0 100644
--- a/libstdc++-v3/include/debug/deque
+++ b/libstdc++-v3/include/debug/deque
@@ -1,6 +1,6 @@
// Debugging deque implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -173,52 +173,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -496,17 +496,17 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_Base::clear();
this->_M_invalidate_all();
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
template<typename _Tp, typename _Alloc>
diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list
index 70bd75a86b9..8f8d0eb80a5 100644
--- a/libstdc++-v3/include/debug/forward_list
+++ b/libstdc++-v3/include/debug/forward_list
@@ -173,39 +173,39 @@ namespace __debug
// iterators:
iterator
- before_begin()
+ before_begin() noexcept
{ return iterator(_Base::before_begin(), this); }
const_iterator
- before_begin() const
+ before_begin() const noexcept
{ return const_iterator(_Base::before_begin(), this); }
iterator
- begin()
+ begin() noexcept
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() noexcept
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_Base::end(), this); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::cbegin(), this); }
const_iterator
- cbefore_begin() const
+ cbefore_begin() const noexcept
{ return const_iterator(_Base::cbefore_begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::cend(), this); }
using _Base::empty;
@@ -392,7 +392,7 @@ namespace __debug
}
void
- clear()
+ clear() noexcept
{
_Base::clear();
this->_M_invalidate_all();
@@ -585,10 +585,10 @@ namespace __debug
using _Base::reverse;
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
private:
void
@@ -669,7 +669,8 @@ namespace __debug
_Safe_iterator_base* __this_its = this->_M_iterators;
_M_swap_aux(__list, __list._M_iterators, *this, this->_M_iterators);
_Safe_iterator_base* __this_const_its = this->_M_const_iterators;
- _M_swap_aux(__list, __list._M_const_iterators, *this, this->_M_const_iterators);
+ _M_swap_aux(__list, __list._M_const_iterators, *this,
+ this->_M_const_iterators);
_M_swap_aux(*this, __this_its, __list, __list._M_iterators);
_M_swap_aux(*this, __this_const_its, __list, __list._M_const_iterators);
}
diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list
index a7a2c549918..45c53ff7515 100644
--- a/libstdc++-v3/include/debug/list
+++ b/libstdc++-v3/include/debug/list
@@ -1,6 +1,6 @@
// Debugging list implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -173,52 +173,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -457,7 +457,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_Base::clear();
this->_M_invalidate_all();
@@ -684,10 +684,10 @@ namespace __debug
using _Base::reverse;
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h
index 31085197f3c..04f8b083f79 100644
--- a/libstdc++-v3/include/debug/map.h
+++ b/libstdc++-v3/include/debug/map.h
@@ -140,52 +140,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -343,7 +343,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
this->_M_invalidate_all();
_Base::clear();
@@ -400,11 +400,11 @@ namespace __debug
const_iterator(__res.second, this));
}
- _Base&
- _M_base() { return *this; }
+ _Base&
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h
index 3c22517b287..0be2fa38dd2 100644
--- a/libstdc++-v3/include/debug/multimap.h
+++ b/libstdc++-v3/include/debug/multimap.h
@@ -139,52 +139,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -326,7 +326,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
this->_M_invalidate_all();
_Base::clear();
@@ -382,10 +382,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h
index 6808fb80411..a9756f53303 100644
--- a/libstdc++-v3/include/debug/multiset.h
+++ b/libstdc++-v3/include/debug/multiset.h
@@ -1,6 +1,6 @@
// Debugging multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -138,52 +138,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -315,7 +315,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
this->_M_invalidate_all();
_Base::clear();
@@ -379,10 +379,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h
index 7ca4c778881..fddd1673149 100644
--- a/libstdc++-v3/include/debug/set.h
+++ b/libstdc++-v3/include/debug/set.h
@@ -138,52 +138,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -323,7 +323,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
this->_M_invalidate_all();
_Base::clear();
@@ -387,10 +387,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 2d7e100c43e..b3295fba5a6 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -141,34 +141,34 @@ namespace __debug
}
void
- clear()
+ clear() noexcept
{
_Base::clear();
this->_M_invalidate_all();
}
iterator
- begin()
+ begin() noexcept
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() noexcept
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_Base::end(), this); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
// local versions
@@ -293,10 +293,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
private:
void
@@ -429,34 +429,34 @@ namespace __debug
}
void
- clear()
+ clear() noexcept
{
_Base::clear();
this->_M_invalidate_all();
}
iterator
- begin()
+ begin() noexcept
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() noexcept
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_Base::end(), this); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
// local versions
@@ -575,10 +575,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
index e30f976d3d6..d67e98775ad 100644
--- a/libstdc++-v3/include/debug/unordered_set
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -1,6 +1,6 @@
// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -141,34 +141,34 @@ namespace __debug
}
void
- clear()
+ clear() noexcept
{
_Base::clear();
this->_M_invalidate_all();
}
iterator
- begin()
+ begin() noexcept
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() noexcept
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_Base::end(), this); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
// local versions
@@ -286,10 +286,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
private:
void
@@ -418,34 +418,34 @@ namespace __debug
}
void
- clear()
+ clear() noexcept
{
_Base::clear();
this->_M_invalidate_all();
}
iterator
- begin()
+ begin() noexcept
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const noexcept
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() noexcept
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const noexcept
{ return const_iterator(_Base::end(), this); }
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
// local versions
@@ -556,10 +556,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
private:
void
diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector
index e2dd71a7e84..f5bdde42bfc 100644
--- a/libstdc++-v3/include/debug/vector
+++ b/libstdc++-v3/include/debug/vector
@@ -1,6 +1,6 @@
// Debugging vector implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -188,52 +188,52 @@ namespace __debug
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -284,7 +284,7 @@ namespace __debug
#endif
size_type
- capacity() const
+ capacity() const _GLIBCXX_NOEXCEPT
{
#ifdef _GLIBCXX_DEBUG_PEDANTIC
return _M_guaranteed_capacity;
@@ -508,7 +508,7 @@ namespace __debug
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_Base::clear();
this->_M_invalidate_all();
@@ -516,10 +516,10 @@ namespace __debug
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
private:
size_type _M_guaranteed_capacity;
diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque
index 1c0e53c723e..564c2dd0fce 100644
--- a/libstdc++-v3/include/profile/deque
+++ b/libstdc++-v3/include/profile/deque
@@ -1,6 +1,6 @@
// Profiling deque implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -154,52 +154,52 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin()); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin()); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end()); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end()); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end()); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -392,16 +392,16 @@ namespace __profile
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
_Base::clear();
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
template<typename _Tp, typename _Alloc>
diff --git a/libstdc++-v3/include/profile/forward_list b/libstdc++-v3/include/profile/forward_list
index 00af855d782..75b59f354a2 100644
--- a/libstdc++-v3/include/profile/forward_list
+++ b/libstdc++-v3/include/profile/forward_list
@@ -1,6 +1,6 @@
// <forward_list> -*- C++ -*-
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011 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
@@ -119,10 +119,10 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
};
template<typename _Tp, typename _Alloc>
diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list
index 21279d2ccb1..589f8f5362b 100644
--- a/libstdc++-v3/include/profile/list
+++ b/libstdc++-v3/include/profile/list
@@ -1,6 +1,6 @@
// Profiling list implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -135,7 +135,8 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
: _Base(__l, __a) { }
#endif
- ~list() {
+ ~list()
+ {
__profcxx_list_destruct(this);
__profcxx_list_destruct2(this);
}
@@ -183,64 +184,64 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{
__profcxx_list_rewind(this);
return iterator(_Base::end(), this);
}
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{
__profcxx_list_rewind(this);
return const_iterator(_Base::end(), this);
}
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{
__profcxx_list_rewind(this);
return reverse_iterator(end());
}
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{
__profcxx_list_rewind(this);
return const_reverse_iterator(end());
}
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -388,7 +389,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
{ _Base::swap(__x); }
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ _Base::clear(); }
// 23.2.2.4 list operations:
@@ -564,15 +565,15 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
using _Base::reverse;
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
- inline void _M_profile_find() const
+ void _M_profile_find() const
{ }
- inline void _M_profile_iterate(int __rewind = 0) const
+ void _M_profile_iterate(int __rewind = 0) const
{
__profcxx_list_operation(this);
__profcxx_list_iterate(this);
diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h
index 1edc16c7879..30f5f3aa679 100644
--- a/libstdc++-v3/include/profile/map.h
+++ b/libstdc++-v3/include/profile/map.h
@@ -137,44 +137,44 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return _Base::begin(); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return _Base::begin(); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return _Base::end(); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return _Base::end(); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{
__profcxx_map_to_unordered_map_invalidate(this);
return reverse_iterator(end());
}
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{
__profcxx_map_to_unordered_map_invalidate(this);
return const_reverse_iterator(end());
}
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{
__profcxx_map_to_unordered_map_invalidate(this);
return reverse_iterator(begin());
}
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{
__profcxx_map_to_unordered_map_invalidate(this);
return const_reverse_iterator(begin());
@@ -182,22 +182,22 @@ namespace __profile
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end()); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{
__profcxx_map_to_unordered_map_invalidate(this);
return const_reverse_iterator(end());
}
const_reverse_iterator
- crend() const
+ crend() const noexcept
{
__profcxx_map_to_unordered_map_invalidate(this);
return const_reverse_iterator(begin());
@@ -359,12 +359,11 @@ namespace __profile
#endif
void
-
swap(map& __x)
{ _Base::swap(__x); }
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ this->erase(begin(), end()); }
// observers:
@@ -443,10 +442,10 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h
index 76ce805f3d7..5f1aba82e34 100644
--- a/libstdc++-v3/include/profile/multimap.h
+++ b/libstdc++-v3/include/profile/multimap.h
@@ -124,52 +124,52 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin()); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin()); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end()); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end()); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end()); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -260,7 +260,7 @@ namespace __profile
{ _Base::swap(__x); }
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ this->erase(begin(), end()); }
// observers:
@@ -315,10 +315,10 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
template<typename _Key, typename _Tp,
diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h
index c6902a0fed4..d1406235845 100644
--- a/libstdc++-v3/include/profile/multiset.h
+++ b/libstdc++-v3/include/profile/multiset.h
@@ -1,6 +1,6 @@
// Profiling multiset implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -124,52 +124,52 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin()); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin()); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end()); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end()); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end()); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -249,7 +249,7 @@ namespace __profile
{ _Base::swap(__x); }
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ this->erase(begin(), end()); }
// observers:
@@ -312,10 +312,10 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h
index d10a11f2e59..8533a48c90d 100644
--- a/libstdc++-v3/include/profile/set.h
+++ b/libstdc++-v3/include/profile/set.h
@@ -1,6 +1,6 @@
// Profiling set implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -124,52 +124,52 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin()); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin()); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end()); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end()); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end()); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -259,7 +259,7 @@ namespace __profile
{ _Base::swap(__x); }
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{ this->erase(begin(), end()); }
// observers:
@@ -322,10 +322,10 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
};
diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map
index cc54009e3f4..058bbd35132 100644
--- a/libstdc++-v3/include/profile/unordered_map
+++ b/libstdc++-v3/include/profile/unordered_map
@@ -1,6 +1,6 @@
// Profiling unordered_map/unordered_multimap implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -150,14 +150,13 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
-
+ _M_base() const noexcept { return *this; }
void
- clear()
+ clear() noexcept
{
__profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size());
@@ -418,14 +417,13 @@ namespace __profile
}
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
-
+ _M_base() const noexcept { return *this; }
void
- clear()
+ clear() noexcept
{
__profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size());
diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set
index 547fb764d22..92c54c10f2a 100644
--- a/libstdc++-v3/include/profile/unordered_set
+++ b/libstdc++-v3/include/profile/unordered_set
@@ -1,6 +1,6 @@
// Profiling unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -155,7 +155,7 @@ namespace __profile
}
void
- clear()
+ clear() noexcept
{
__profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size());
@@ -233,10 +233,10 @@ namespace __profile
private:
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
void
_M_profile_resize(size_type __old_size, size_type __new_size)
@@ -397,7 +397,7 @@ namespace __profile
}
void
- clear()
+ clear() noexcept
{
__profcxx_hashtable_destruct(this, _Base::bucket_count(),
_Base::size());
@@ -475,10 +475,10 @@ namespace __profile
private:
_Base&
- _M_base() { return *this; }
+ _M_base() noexcept { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const noexcept { return *this; }
void
_M_profile_resize(size_type __old_size, size_type __new_size)
diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector
index f8a9622e8ba..83a4a3b4c4a 100644
--- a/libstdc++-v3/include/profile/vector
+++ b/libstdc++-v3/include/profile/vector
@@ -1,6 +1,6 @@
// Profiling vector implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -70,10 +70,10 @@ namespace __profile
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
_Base&
- _M_base() { return *this; }
+ _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base&
- _M_base() const { return *this; }
+ _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
// 23.2.4.1 construct/copy/destroy:
explicit
@@ -148,7 +148,8 @@ namespace __profile
: _Base(__l, __a) { }
#endif
- ~vector() {
+ ~vector()
+ {
__profcxx_vector_destruct(this, this->capacity(), this->size());
__profcxx_vector_destruct2(this);
}
@@ -185,52 +186,52 @@ namespace __profile
// iterators:
iterator
- begin()
+ begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); }
const_iterator
- begin() const
+ begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); }
iterator
- end()
+ end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); }
const_iterator
- end() const
+ end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); }
reverse_iterator
- rbegin()
+ rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); }
const_reverse_iterator
- rbegin() const
+ rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); }
reverse_iterator
- rend()
+ rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); }
const_reverse_iterator
- rend() const
+ rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
const_iterator
- cbegin() const
+ cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
const_iterator
- cend() const
+ cend() const noexcept
{ return const_iterator(_Base::end(), this); }
const_reverse_iterator
- crbegin() const
+ crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
- crend() const
+ crend() const noexcept
{ return const_reverse_iterator(begin()); }
#endif
@@ -417,7 +418,7 @@ namespace __profile
}
void
- clear()
+ clear() _GLIBCXX_NOEXCEPT
{
__profcxx_vector_destruct(this, this->capacity(), this->size());
__profcxx_vector_destruct2(this);
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index 89ded2c80d4..86e6e0019e1 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -352,28 +352,28 @@ _GLIBCXX_END_NAMESPACE_VERSION
template<typename _Rep1, typename _Period1,
typename _Rep2, typename _Period2>
- inline typename common_type<duration<_Rep1, _Period1>,
- duration<_Rep2, _Period2>>::type
+ inline constexpr typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type
operator+(const duration<_Rep1, _Period1>& __lhs,
const duration<_Rep2, _Period2>& __rhs)
{
typedef duration<_Rep1, _Period1> __dur1;
typedef duration<_Rep2, _Period2> __dur2;
- typedef typename common_type<__dur1,__dur2>::type __ct;
- return __ct(__lhs) += __rhs;
+ typedef typename common_type<__dur1,__dur2>::type __cd;
+ return __cd(__cd(__lhs).count() + __cd(__rhs).count());
}
template<typename _Rep1, typename _Period1,
typename _Rep2, typename _Period2>
- inline typename common_type<duration<_Rep1, _Period1>,
- duration<_Rep2, _Period2>>::type
+ inline constexpr typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type
operator-(const duration<_Rep1, _Period1>& __lhs,
const duration<_Rep2, _Period2>& __rhs)
{
typedef duration<_Rep1, _Period1> __dur1;
typedef duration<_Rep2, _Period2> __dur2;
- typedef typename common_type<__dur1,__dur2>::type __ct;
- return __ct(__lhs) -= __rhs;
+ typedef typename common_type<__dur1,__dur2>::type __cd;
+ return __cd(__cd(__lhs).count() - __cd(__rhs).count());
}
template<typename _Rep1, typename _Rep2, bool =
@@ -386,60 +386,65 @@ _GLIBCXX_END_NAMESPACE_VERSION
{ typedef typename common_type<_Rep1, _Rep2>::type type; };
template<typename _Rep1, typename _Period, typename _Rep2>
- inline duration<typename __common_rep_type<_Rep1, _Rep2>::type, _Period>
+ inline constexpr
+ duration<typename __common_rep_type<_Rep1, _Rep2>::type, _Period>
operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
- typedef typename common_type<_Rep1, _Rep2>::type __cr;
- return duration<__cr, _Period>(__d) *= __s;
+ typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+ __cd;
+ return __cd(__cd(__d).count() * __s);
}
template<typename _Rep1, typename _Period, typename _Rep2>
- inline duration<typename __common_rep_type<_Rep2, _Rep1>::type, _Period>
+ inline constexpr
+ duration<typename __common_rep_type<_Rep2, _Rep1>::type, _Period>
operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
{ return __d * __s; }
template<typename _Rep1, typename _Period, typename _Rep2>
- inline duration<typename __common_rep_type<_Rep1, typename
+ inline constexpr duration<typename __common_rep_type<_Rep1, typename
enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
- typedef typename common_type<_Rep1, _Rep2>::type __cr;
- return duration<__cr, _Period>(__d) /= __s;
+ typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+ __cd;
+ return __cd(__cd(__d).count() / __s);
}
template<typename _Rep1, typename _Period1,
typename _Rep2, typename _Period2>
- inline typename common_type<_Rep1, _Rep2>::type
+ inline constexpr typename common_type<_Rep1, _Rep2>::type
operator/(const duration<_Rep1, _Period1>& __lhs,
const duration<_Rep2, _Period2>& __rhs)
{
typedef duration<_Rep1, _Period1> __dur1;
typedef duration<_Rep2, _Period2> __dur2;
- typedef typename common_type<__dur1,__dur2>::type __ct;
- return __ct(__lhs).count() / __ct(__rhs).count();
+ typedef typename common_type<__dur1,__dur2>::type __cd;
+ return __cd(__lhs).count() / __cd(__rhs).count();
}
// DR 934.
template<typename _Rep1, typename _Period, typename _Rep2>
- inline duration<typename __common_rep_type<_Rep1, typename
+ inline constexpr duration<typename __common_rep_type<_Rep1, typename
enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period>
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
- typedef typename common_type<_Rep1, _Rep2>::type __cr;
- return duration<__cr, _Period>(__d) %= __s;
+ typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+ __cd;
+ return __cd(__cd(__d).count() % __s);
}
template<typename _Rep1, typename _Period1,
typename _Rep2, typename _Period2>
- inline typename common_type<duration<_Rep1, _Period1>,
- duration<_Rep2, _Period2>>::type
+ inline constexpr typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type
operator%(const duration<_Rep1, _Period1>& __lhs,
const duration<_Rep2, _Period2>& __rhs)
{
typedef duration<_Rep1, _Period1> __dur1;
typedef duration<_Rep2, _Period2> __dur2;
- typedef typename common_type<__dur1,__dur2>::type __ct;
- return __ct(__lhs) %= __rhs;
+ typedef typename common_type<__dur1,__dur2>::type __cd;
+ return __cd(__cd(__lhs).count() % __cd(__rhs).count());
}
// comparisons
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex
index 36f894efebb..2ba95769504 100644
--- a/libstdc++-v3/include/std/mutex
+++ b/libstdc++-v3/include/std/mutex
@@ -1,6 +1,6 @@
// <mutex> -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -70,9 +70,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __native_type* native_handle_type;
#ifdef __GTHREAD_MUTEX_INIT
- constexpr mutex() : _M_mutex(__GTHREAD_MUTEX_INIT) { }
+ constexpr mutex() noexcept : _M_mutex(__GTHREAD_MUTEX_INIT) { }
#else
- mutex()
+ mutex() noexcept
{
// XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
__GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
@@ -95,7 +95,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
- try_lock()
+ try_lock() noexcept
{
// XXX EINVAL, EAGAIN, EBUSY
return !__gthread_mutex_trylock(&_M_mutex);
@@ -188,7 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
- try_lock()
+ try_lock() noexcept
{
// XXX EINVAL, EAGAIN, EBUSY
return !__gthread_recursive_mutex_trylock(&_M_mutex);
@@ -247,7 +247,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
- try_lock()
+ try_lock() noexcept
{
// XXX EINVAL, EAGAIN, EBUSY
return !__gthread_mutex_trylock(&_M_mutex);
@@ -354,7 +354,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
- try_lock()
+ try_lock() noexcept
{
// XXX EINVAL, EAGAIN, EBUSY
return !__gthread_recursive_mutex_trylock(&_M_mutex);
@@ -464,7 +464,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
typedef _Mutex mutex_type;
- unique_lock()
+ unique_lock() noexcept
: _M_device(0), _M_owns(false)
{ }
@@ -475,7 +475,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_owns = true;
}
- unique_lock(mutex_type& __m, defer_lock_t)
+ unique_lock(mutex_type& __m, defer_lock_t) noexcept
: _M_device(&__m), _M_owns(false)
{ }
@@ -510,14 +510,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
unique_lock(const unique_lock&) = delete;
unique_lock& operator=(const unique_lock&) = delete;
- unique_lock(unique_lock&& __u)
+ unique_lock(unique_lock&& __u) noexcept
: _M_device(__u._M_device), _M_owns(__u._M_owns)
{
__u._M_device = 0;
__u._M_owns = false;
}
- unique_lock& operator=(unique_lock&& __u)
+ unique_lock& operator=(unique_lock&& __u) noexcept
{
if(_M_owns)
unlock();
@@ -601,14 +601,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- swap(unique_lock& __u)
+ swap(unique_lock& __u) noexcept
{
std::swap(_M_device, __u._M_device);
std::swap(_M_owns, __u._M_owns);
}
mutex_type*
- release()
+ release() noexcept
{
mutex_type* __ret = _M_device;
_M_device = 0;
@@ -617,14 +617,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
- owns_lock() const
+ owns_lock() const noexcept
{ return _M_owns; }
- explicit operator bool() const
+ explicit operator bool() const noexcept
{ return owns_lock(); }
mutex_type*
- mutex() const
+ mutex() const noexcept
{ return _M_device; }
private:
@@ -632,9 +632,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool _M_owns; // XXX use atomic_bool
};
+ /// Partial specialization for unique_lock objects.
template<typename _Mutex>
inline void
- swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y)
+ swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept
{ __x.swap(__y); }
template<int _Idx>
@@ -759,9 +760,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__native_type _M_once;
public:
- constexpr once_flag() : _M_once(__GTHREAD_ONCE_INIT) { }
+ /// Constructor
+ constexpr once_flag() noexcept : _M_once(__GTHREAD_ONCE_INIT) { }
+ /// Deleted copy constructor
once_flag(const once_flag&) = delete;
+ /// Deleted assignment operator
once_flag& operator=(const once_flag&) = delete;
template<typename _Callable, typename... _Args>
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index de58e814100..4fa5e505146 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
native_handle_type _M_thread;
public:
- id() : _M_thread() { }
+ id() noexcept : _M_thread() { }
explicit
id(native_handle_type __id) : _M_thread(__id) { }
@@ -82,11 +82,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend class hash<thread::id>;
friend bool
- operator==(thread::id __x, thread::id __y)
+ operator==(thread::id __x, thread::id __y) noexcept
{ return __gthread_equal(__x._M_thread, __y._M_thread); }
friend bool
- operator<(thread::id __x, thread::id __y)
+ operator<(thread::id __x, thread::id __y) noexcept
{ return __x._M_thread < __y._M_thread; }
template<class _CharT, class _Traits>
@@ -121,11 +121,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
id _M_id;
public:
- thread() = default;
+ thread() noexcept = default;
thread(thread&) = delete;
thread(const thread&) = delete;
- thread(thread&& __t)
+ thread(thread&& __t) noexcept
{ swap(__t); }
template<typename _Callable, typename... _Args>
@@ -145,7 +145,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
thread& operator=(const thread&) = delete;
- thread& operator=(thread&& __t)
+ thread& operator=(thread&& __t) noexcept
{
if (joinable())
std::terminate();
@@ -154,11 +154,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- swap(thread& __t)
+ swap(thread& __t) noexcept
{ std::swap(_M_id, __t._M_id); }
bool
- joinable() const
+ joinable() const noexcept
{ return !(_M_id == id()); }
void
@@ -168,7 +168,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
detach();
thread::id
- get_id() const
+ get_id() const noexcept
{ return _M_id; }
/** @pre thread is joinable
@@ -179,7 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Returns a value that hints at the number of hardware thread contexts.
static unsigned int
- hardware_concurrency()
+ hardware_concurrency() noexcept
{ return 0; }
private:
@@ -198,23 +198,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline thread::_Impl_base::~_Impl_base() = default;
inline void
- swap(thread& __x, thread& __y)
+ swap(thread& __x, thread& __y) noexcept
{ __x.swap(__y); }
inline bool
- operator!=(thread::id __x, thread::id __y)
+ operator!=(thread::id __x, thread::id __y) noexcept
{ return !(__x == __y); }
inline bool
- operator<=(thread::id __x, thread::id __y)
+ operator<=(thread::id __x, thread::id __y) noexcept
{ return !(__y < __x); }
inline bool
- operator>(thread::id __x, thread::id __y)
+ operator>(thread::id __x, thread::id __y) noexcept
{ return __y < __x; }
inline bool
- operator>=(thread::id __x, thread::id __y)
+ operator>=(thread::id __x, thread::id __y) noexcept
{ return !(__x < __y); }
// DR 889.
@@ -250,12 +250,12 @@ _GLIBCXX_END_NAMESPACE_VERSION
/// get_id
inline thread::id
- get_id() { return thread::id(__gthread_self()); }
+ get_id() noexcept { return thread::id(__gthread_self()); }
#ifdef _GLIBCXX_USE_SCHED_YIELD
/// yield
inline void
- yield()
+ yield() noexcept
{ __gthread_yield(); }
#endif
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index 6e3d415cd11..7514fa4c5c1 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -85,7 +85,7 @@ namespace
# if defined(__GTHREAD_HAS_COND) && !defined(_GLIBCXX_USE_FUTEX)
namespace
{
- // A single conditional variable controlling all static initializations.
+ // A single condition variable controlling all static initializations.
static __gnu_cxx::__cond* static_cond;
// using a fake type to avoid initializing a static class.
@@ -136,7 +136,7 @@ __set_and_release (__cxxabiv1::__guard *g)
#endif /* __GTHREADS */
//
-// Here are C++ run-time routines for guarded initiailization of static
+// Here are C++ run-time routines for guarded initialization of static
// variables. There are 4 scenarios under which these routines are called:
//
// 1. Threads not supported (__GTHREADS not defined)
@@ -147,24 +147,24 @@ __set_and_release (__cxxabiv1::__guard *g)
//
// The old code supported scenarios 1-3 but was broken since it used a global
// mutex for all threads and had the mutex locked during the whole duration of
-// initlization of a guarded static variable. The following created a dead-lock
-// with the old code.
+// initialization of a guarded static variable. The following created a
+// dead-lock with the old code.
//
// Thread 1 acquires the global mutex.
// Thread 1 starts initializing static variable.
// Thread 1 creates thread 2 during initialization.
-// Thread 2 attempts to acuqire mutex to initialize another variable.
+// Thread 2 attempts to acquire mutex to initialize another variable.
// Thread 2 blocks since thread 1 is locking the mutex.
// Thread 1 waits for result from thread 2 and also blocks. A deadlock.
//
-// The new code here can handle this situation and thus is more robust. Howere,
-// we need to use the POSIX thread conditional variable, which is not supported
+// The new code here can handle this situation and thus is more robust. However,
+// we need to use the POSIX thread condition variable, which is not supported
// in all platforms, notably older versions of Microsoft Windows. The gthr*.h
// headers define a symbol __GTHREAD_HAS_COND for platforms that support POSIX
-// like conditional variables. For platforms that do not support conditional
+// like condition variables. For platforms that do not support condition
// variables, we need to fall back to the old code.
-// If _GLIBCXX_USE_FUTEX, no global mutex or conditional variable is used,
+// If _GLIBCXX_USE_FUTEX, no global mutex or condition variable is used,
// only atomic operations are used together with futex syscall.
// Valid values of the first integer in guard are:
// 0 No thread encountered the guarded init
@@ -211,7 +211,7 @@ namespace __cxxabiv1
#endif
}
- // acuire() is a helper function used to acquire guard if thread support is
+ // acquire() is a helper function used to acquire guard if thread support is
// not compiled in or is compiled in but not enabled at run-time.
static int
acquire(__guard *g)
@@ -284,7 +284,7 @@ namespace __cxxabiv1
{
// The guarded static is currently being initialized by
// another thread, so we release mutex and wait for the
- // conditional variable. We will lock the mutex again after
+ // condition variable. We will lock the mutex again after
// this.
get_static_cond().wait_recursive(&get_static_mutex());
}
@@ -295,7 +295,7 @@ namespace __cxxabiv1
}
# else
// This provides compatibility with older systems not supporting
- // POSIX like conditional variables.
+ // POSIX like condition variables.
if (acquire(g))
{
mw.unlock = false;
@@ -335,7 +335,7 @@ namespace __cxxabiv1
set_init_in_progress_flag(g, 0);
// If we abort, we still need to wake up all other threads waiting for
- // the conditional variable.
+ // the condition variable.
get_static_cond().broadcast();
return;
}
@@ -344,7 +344,7 @@ namespace __cxxabiv1
set_init_in_progress_flag(g, 0);
#if defined(__GTHREADS) && !defined(__GTHREAD_HAS_COND)
// This provides compatibility with older systems not supporting POSIX like
- // conditional variables.
+ // condition variables.
if (__gthread_active_p ())
static_mutex->unlock();
#endif
@@ -385,7 +385,7 @@ namespace __cxxabiv1
#if defined(__GTHREADS) && !defined(__GTHREAD_HAS_COND)
// This provides compatibility with older systems not supporting POSIX like
- // conditional variables.
+ // condition variables.
if (__gthread_active_p())
static_mutex->unlock();
#endif
diff --git a/libstdc++-v3/src/compatibility-list-2.cc b/libstdc++-v3/src/compatibility-list-2.cc
index 58f8cea55f2..ac69798740d 100644
--- a/libstdc++-v3/src/compatibility-list-2.cc
+++ b/libstdc++-v3/src/compatibility-list-2.cc
@@ -43,21 +43,22 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT
void
_M_transfer(_List_node_base * const __first,
- _List_node_base * const __last) throw ();
+ _List_node_base * const __last) _GLIBCXX_USE_NOEXCEPT;
void
- _M_reverse() throw ();
+ _M_reverse() _GLIBCXX_USE_NOEXCEPT;
void
- _M_hook(_List_node_base * const __position) throw ();
+ _M_hook(_List_node_base * const __position) _GLIBCXX_USE_NOEXCEPT;
void
- _M_unhook() throw ();
+ _M_unhook() _GLIBCXX_USE_NOEXCEPT;
};
void
- _List_node_base::_M_transfer(_List_node_base * const __first,
- _List_node_base * const __last) throw ()
+ _List_node_base::
+ _M_transfer(_List_node_base * const __first,
+ _List_node_base * const __last) _GLIBCXX_USE_NOEXCEPT
{
if (this != __last)
{
@@ -75,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT
}
void
- _List_node_base::_M_reverse() throw ()
+ _List_node_base::_M_reverse() _GLIBCXX_USE_NOEXCEPT
{
_List_node_base* __tmp = this;
do
@@ -89,7 +90,8 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT
}
void
- _List_node_base::_M_hook(_List_node_base* const __position) throw ()
+ _List_node_base::
+ _M_hook(_List_node_base* const __position) _GLIBCXX_USE_NOEXCEPT
{
this->_M_next = __position;
this->_M_prev = __position->_M_prev;
@@ -98,7 +100,7 @@ _GLIBCXX_BEGIN_NAMESPACE_COMPAT
}
void
- _List_node_base::_M_unhook() throw ()
+ _List_node_base::_M_unhook() _GLIBCXX_USE_NOEXCEPT
{
_List_node_base* const __next_node = this->_M_next;
_List_node_base* const __prev_node = this->_M_prev;
diff --git a/libstdc++-v3/src/list.cc b/libstdc++-v3/src/list.cc
index 92b007f58ae..6dbad69ac64 100644
--- a/libstdc++-v3/src/list.cc
+++ b/libstdc++-v3/src/list.cc
@@ -57,7 +57,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
void
- _List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw()
+ _List_node_base::swap(_List_node_base& __x,
+ _List_node_base& __y) _GLIBCXX_USE_NOEXCEPT
{
if ( __x._M_next != &__x )
{
@@ -89,8 +90,9 @@ namespace std _GLIBCXX_VISIBILITY(default)
}
void
- _List_node_base::_M_transfer(_List_node_base * const __first,
- _List_node_base * const __last) throw()
+ _List_node_base::
+ _M_transfer(_List_node_base * const __first,
+ _List_node_base * const __last) _GLIBCXX_USE_NOEXCEPT
{
if (this != __last)
{
@@ -108,7 +110,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
}
void
- _List_node_base::_M_reverse() throw()
+ _List_node_base::_M_reverse() _GLIBCXX_USE_NOEXCEPT
{
_List_node_base* __tmp = this;
do
@@ -122,7 +124,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
}
void
- _List_node_base::_M_hook(_List_node_base* const __position) throw()
+ _List_node_base::
+ _M_hook(_List_node_base* const __position) _GLIBCXX_USE_NOEXCEPT
{
this->_M_next = __position;
this->_M_prev = __position->_M_prev;
@@ -131,7 +134,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
}
void
- _List_node_base::_M_unhook() throw()
+ _List_node_base::_M_unhook() _GLIBCXX_USE_NOEXCEPT
{
_List_node_base* const __next_node = this->_M_next;
_List_node_base* const __prev_node = this->_M_prev;
diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc
new file mode 100644
index 00000000000..3f28f37f4c4
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// Copyright (C) 2011 Free Software Foundation
+//
+// 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/>.
+
+// 20.11.5 Class template duration [time.duration]
+
+#include <chrono>
+#include <testsuite_hooks.h>
+
+// DR 2020
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::chrono;
+
+ constexpr duration<int> d0(12);
+ constexpr duration<int> d1(3);
+ constexpr int i = 5;
+
+ constexpr auto d2 = d0 + d1;
+ VERIFY( d2.count() == 15 );
+
+ constexpr auto d3 = d0 - d1;
+ VERIFY( d3.count() == 9 );
+
+ constexpr auto d4 = d0 * i;
+ VERIFY( d4.count() == 60 );
+
+ constexpr auto d5 = i * d0;
+ VERIFY( d5.count() == 60 );
+
+ constexpr auto d6 = d0 % i;
+ VERIFY( d6.count() == 2 );
+
+ constexpr auto j = d0 % d1;
+ VERIFY( j.count() == 0 );
+
+ constexpr auto d7 = d0 / i;
+ VERIFY( d7.count() == 2 );
+
+ constexpr auto k = d0 / d1;
+ VERIFY( k == 4 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc
index 0201cc7dca0..0027a34e42d 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc
@@ -1,3 +1,5 @@
+// { dg-require-c-std "" }
+
// Copyright (C) 2011 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760_c++0x.cc b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760_c++0x.cc
index f0017b113d0..3500dbaaf17 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760_c++0x.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760_c++0x.cc
@@ -1,4 +1,5 @@
// { dg-options "-std=gnu++0x" }
+// { dg-require-c-std "" }
// Copyright (C) 2011 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/19322.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/19322.cc
index 955286f0645..25494c3571f 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/19322.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/19322.cc
@@ -1,4 +1,6 @@
-// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+// { dg-require-c-std "" }
+
+// Copyright (C) 2005, 2009, 2010, 2011 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
@@ -15,11 +17,9 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-
#include <cmath>
#include <testsuite_hooks.h>
-#if _GLIBCXX_USE_C99_MATH
// libstdc++/19322
void test01()
{
@@ -27,12 +27,9 @@ void test01()
VERIFY( !std::isnan(3.0) );
}
-#endif
int main()
{
-#if _GLIBCXX_USE_C99_MATH
test01();
-#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/backward/hash_set/49060.cc b/libstdc++-v3/testsuite/backward/hash_set/49060.cc
new file mode 100644
index 00000000000..985cfcf6afd
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_set/49060.cc
@@ -0,0 +1,35 @@
+// { dg-options "-Wno-deprecated" }
+
+#include <backward/hashtable.h>
+#include <utility>
+
+struct modulo2_hash
+{
+ size_t operator()(int const key) const
+ {
+ return key % 2;
+ }
+};
+
+struct modulo2_eq
+{
+ bool operator()(int const left, int const right) const
+ {
+ return left % 2 == right % 2;
+ }
+};
+
+int main()
+{
+ typedef std::_Select1st<std::pair<int const, int> > extract_type;
+ typedef
+ __gnu_cxx::hashtable<std::pair<int const, int>, int, modulo2_hash,
+ extract_type, modulo2_eq, std::allocator<int> >
+ table_type;
+ table_type table(4, modulo2_hash(), modulo2_eq(), extract_type(),
+ std::allocator<int>());
+
+ table.insert_equal(std::make_pair(2, 1));
+ table_type::iterator it(table.insert_equal(std::make_pair(4, 2)));
+ table.erase(it->first);
+}
diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
index 632dc190adc..eb77fb4837e 100644
--- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
+++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
@@ -25,4 +25,4 @@
#include <vector>
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 252 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 255 }