aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/debug/unordered_map
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/debug/unordered_map')
-rw-r--r--libstdc++-v3/include/debug/unordered_map33
1 files changed, 33 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 590d4a3478f..79590f56755 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -40,6 +40,7 @@
#else
# include <c++0x_warning.h>
#endif
+#include <initializer_list>
#include <debug/safe_association.h>
#include <debug/safe_iterator.h>
@@ -64,6 +65,7 @@ namespace __debug
public:
typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::value_type value_type;
typedef typename _Safe_assoc::hasher hasher;
typedef typename _Safe_assoc::key_equal key_equal;
typedef typename _Safe_assoc::allocator_type allocator_type;
@@ -91,6 +93,13 @@ namespace __debug
unordered_map(unordered_map&& __x)
: _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
+
unordered_map&
operator=(unordered_map&& __x)
{
@@ -100,6 +109,14 @@ namespace __debug
return *this;
}
+ unordered_map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
void
swap(unordered_map&& __x)
{
@@ -164,6 +181,7 @@ namespace __debug
public:
typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::value_type value_type;
typedef typename _Safe_assoc::hasher hasher;
typedef typename _Safe_assoc::key_equal key_equal;
typedef typename _Safe_assoc::allocator_type allocator_type;
@@ -185,6 +203,13 @@ namespace __debug
: _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
{ }
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__l, __n, __hf, __eql, __a) { }
+
unordered_multimap(const _Safe_assoc& __x)
: _Safe_assoc(__x), _Safe_base() { }
@@ -200,6 +225,14 @@ namespace __debug
return *this;
}
+ unordered_multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
void
swap(unordered_multimap&& __x)
{