aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2016-10-26 20:52:21 +0000
committerFrançois Dumont <fdumont@gcc.gnu.org>2016-10-26 20:52:21 +0000
commite3ece66d53a231ee08f0d7e4d46daa825e1f65c6 (patch)
tree9f7f2d6abf03481dda345cc97998679646ee7b8f
parentdb659b81a4b1ed5ea7537e9987b29f858a0273f4 (diff)
2016-10-26 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_map.h (map()): Make default. * include/bits/stl_multimap.h (multimap()): Likewise. * include/bits/stl_multiset.h (multiset()): Likewise. * include/bits/stl_set.h (set()): Likewise. * include/bits/stl_tree.h (_Rb_tree_impl()): Add conditional noexcept. (_Rb_tree()): Make default. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@241601 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/include/bits/stl_map.h10
-rw-r--r--libstdc++-v3/include/bits/stl_multimap.h10
-rw-r--r--libstdc++-v3/include/bits/stl_multiset.h10
-rw-r--r--libstdc++-v3/include/bits/stl_set.h10
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h13
6 files changed, 39 insertions, 23 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index de98de1236c..d3a07b6885e 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2016-10-26 François Dumont <fdumont@gcc.gnu.org>
+
+ * include/bits/stl_map.h (map()): Make default.
+ * include/bits/stl_multimap.h (multimap()): Likewise.
+ * include/bits/stl_multiset.h (multiset()): Likewise.
+ * include/bits/stl_set.h (set()): Likewise.
+ * include/bits/stl_tree.h (_Rb_tree_impl()): Add conditional noexcept.
+ (_Rb_tree()): Make default.
+
2016-10-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR libstdc++/78110
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index e5b2a1b6b92..dea7d5bc376 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -167,11 +167,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/**
* @brief Default constructor creates no elements.
*/
- map()
- _GLIBCXX_NOEXCEPT_IF(
- is_nothrow_default_constructible<allocator_type>::value
- && is_nothrow_default_constructible<key_compare>::value)
- : _M_t() { }
+#if __cplusplus < 201103L
+ map() : _M_t() { }
+#else
+ map() = default;
+#endif
/**
* @brief Creates a %map with no elements.
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h
index d24042767df..7e86b76e987 100644
--- a/libstdc++-v3/include/bits/stl_multimap.h
+++ b/libstdc++-v3/include/bits/stl_multimap.h
@@ -164,11 +164,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/**
* @brief Default constructor creates no elements.
*/
- multimap()
- _GLIBCXX_NOEXCEPT_IF(
- is_nothrow_default_constructible<allocator_type>::value
- && is_nothrow_default_constructible<key_compare>::value)
- : _M_t() { }
+#if __cplusplus < 201103L
+ multimap() : _M_t() { }
+#else
+ multimap() = default;
+#endif
/**
* @brief Creates a %multimap with no elements.
diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h
index cc068a9981f..7fe2fbd4f02 100644
--- a/libstdc++-v3/include/bits/stl_multiset.h
+++ b/libstdc++-v3/include/bits/stl_multiset.h
@@ -144,11 +144,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/**
* @brief Default constructor creates no elements.
*/
- multiset()
- _GLIBCXX_NOEXCEPT_IF(
- is_nothrow_default_constructible<allocator_type>::value
- && is_nothrow_default_constructible<key_compare>::value)
- : _M_t() { }
+#if __cplusplus < 201103L
+ multiset() : _M_t() { }
+#else
+ multiset() = default;
+#endif
/**
* @brief Creates a %multiset with no elements.
diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h
index 39383514385..5ed9672de58 100644
--- a/libstdc++-v3/include/bits/stl_set.h
+++ b/libstdc++-v3/include/bits/stl_set.h
@@ -147,11 +147,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/**
* @brief Default constructor creates no elements.
*/
- set()
- _GLIBCXX_NOEXCEPT_IF(
- is_nothrow_default_constructible<allocator_type>::value
- && is_nothrow_default_constructible<key_compare>::value)
- : _M_t() { }
+#if __cplusplus < 201103L
+ set() : _M_t() { }
+#else
+ set() = default;
+#endif
/**
* @brief Creates a %set with no elements.
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 32da609e38d..2c67ad96dd1 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -602,10 +602,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Rb_tree_impl : public _Node_allocator
{
_Key_compare _M_key_compare;
- _Rb_tree_node_base _M_header;
- size_type _M_node_count; // Keeps track of size of tree.
+ _Rb_tree_node_base _M_header;
+ size_type _M_node_count; // Keeps track of size of tree.
_Rb_tree_impl()
+ _GLIBCXX_NOEXCEPT_IF(
+ is_nothrow_default_constructible<_Node_allocator>::value
+ && is_nothrow_default_constructible<_Key_compare>::value)
: _Node_allocator(), _M_key_compare(), _M_header(),
_M_node_count(0)
{ _M_initialize(); }
@@ -639,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
this->_M_header._M_parent = 0;
this->_M_header._M_left = &this->_M_header;
this->_M_header._M_right = &this->_M_header;
- }
+ }
};
_Rb_tree_impl<_Compare> _M_impl;
@@ -831,7 +834,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
// allocation/deallocation
+#if __cplusplus < 201103L
_Rb_tree() { }
+#else
+ _Rb_tree() = default;
+#endif
_Rb_tree(const _Compare& __comp,
const allocator_type& __a = allocator_type())