summaryrefslogtreecommitdiff
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_map36
1 files changed, 36 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 2e2f9122ee0..6f37e040a26 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -190,6 +190,28 @@ namespace __debug
return iterator(__res.first, this);
}
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_convertible<_Pair,
+ value_type>::value>::type>
+ std::pair<iterator, bool>
+ insert(_Pair&& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(std::forward<_Pair>(__obj));
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_convertible<_Pair,
+ value_type>::value>::type>
+ iterator
+ insert(const_iterator, _Pair&& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(std::forward<_Pair>(__obj));
+ return iterator(__res.first, this);
+ }
+
void
insert(std::initializer_list<value_type> __l)
{ _Base::insert(__l); }
@@ -444,6 +466,20 @@ namespace __debug
insert(const_iterator, const value_type& __obj)
{ return iterator(_Base::insert(__obj), this); }
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_convertible<_Pair,
+ value_type>::value>::type>
+ iterator
+ insert(_Pair&& __obj)
+ { return iterator(_Base::insert(std::forward<_Pair>(__obj)), this); }
+
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_convertible<_Pair,
+ value_type>::value>::type>
+ iterator
+ insert(const_iterator, _Pair&& __obj)
+ { return iterator(_Base::insert(std::forward<_Pair>(__obj)), this); }
+
void
insert(std::initializer_list<value_type> __l)
{ _Base::insert(__l); }