summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/unordered_set
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/unordered_set')
-rw-r--r--contrib/libc++/include/unordered_set243
1 files changed, 239 insertions, 4 deletions
diff --git a/contrib/libc++/include/unordered_set b/contrib/libc++/include/unordered_set
index 119251d..fd378fa 100644
--- a/contrib/libc++/include/unordered_set
+++ b/contrib/libc++/include/unordered_set
@@ -68,6 +68,16 @@ public:
unordered_set(initializer_list<value_type>, size_type n = 0,
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
+ unordered_set(size_type n, const allocator_type& a); // C++14
+ unordered_set(size_type n, const hasher& hf, const allocator_type& a); // C++14
+ template <class InputIterator>
+ unordered_set(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14
+ template <class InputIterator>
+ unordered_set(InputIterator f, InputIterator l, size_type n,
+ const hasher& hf, const allocator_type& a); // C++14
+ unordered_set(initializer_list<value_type> il, size_type n, const allocator_type& a); // C++14
+ unordered_set(initializer_list<value_type> il, size_type n,
+ const hasher& hf, const allocator_type& a); // C++14
~unordered_set();
unordered_set& operator=(const unordered_set&);
unordered_set& operator=(unordered_set&&)
@@ -207,6 +217,16 @@ public:
unordered_multiset(initializer_list<value_type>, size_type n = /see below/,
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
+ unordered_multiset(size_type n, const allocator_type& a); // C++14
+ unordered_multiset(size_type n, const hasher& hf, const allocator_type& a); // C++14
+ template <class InputIterator>
+ unordered_multiset(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14
+ template <class InputIterator>
+ unordered_multiset(InputIterator f, InputIterator l, size_type n,
+ const hasher& hf, const allocator_type& a); // C++14
+ unordered_multiset(initializer_list<value_type> il, size_type n, const allocator_type& a); // C++14
+ unordered_multiset(initializer_list<value_type> il, size_type n,
+ const hasher& hf, const allocator_type& a); // C++14
~unordered_multiset();
unordered_multiset& operator=(const unordered_multiset&);
unordered_multiset& operator=(unordered_multiset&&)
@@ -313,7 +333,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS unordered_set
+class _LIBCPP_TYPE_VIS_ONLY unordered_set
{
public:
// types
@@ -324,6 +344,8 @@ public:
typedef _Alloc allocator_type;
typedef value_type& reference;
typedef const value_type& const_reference;
+ static_assert((is_same<value_type, typename allocator_type::value_type>::value),
+ "Invalid allocator::value_type");
private:
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
@@ -344,9 +366,21 @@ public:
_LIBCPP_INLINE_VISIBILITY
unordered_set()
_NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
- {} // = default;
+ {
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
+ }
explicit unordered_set(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
+#if _LIBCPP_STD_VER > 11
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_set(size_type __n, const allocator_type& __a)
+ : unordered_set(__n, hasher(), key_equal(), __a) {}
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a)
+ : unordered_set(__n, __hf, key_equal(), __a) {}
+#endif
unordered_set(size_type __n, const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
template <class _InputIterator>
@@ -359,6 +393,17 @@ public:
unordered_set(_InputIterator __first, _InputIterator __last,
size_type __n, const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
+#if _LIBCPP_STD_VER > 11
+ template <class _InputIterator>
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n, const allocator_type& __a)
+ : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) {}
+ template <class _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf, const allocator_type& __a)
+ : unordered_set(__first, __last, __n, __hf, key_equal(), __a) {}
+#endif
explicit unordered_set(const allocator_type& __a);
unordered_set(const unordered_set& __u);
unordered_set(const unordered_set& __u, const allocator_type& __a);
@@ -375,6 +420,16 @@ public:
unordered_set(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
+#if _LIBCPP_STD_VER > 11
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_set(initializer_list<value_type> __il, size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__il, __n, hasher(), key_equal(), __a) {}
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_set(initializer_list<value_type> __il, size_type __n,
+ const hasher& __hf, const allocator_type& __a)
+ : unordered_set(__il, __n, __hf, key_equal(), __a) {}
+#endif
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_set() = default;
_LIBCPP_INLINE_VISIBILITY
@@ -422,8 +477,18 @@ public:
{return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);}
template <class... _Args>
_LIBCPP_INLINE_VISIBILITY
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ iterator emplace_hint(const_iterator __p, _Args&&... __args)
+ {
+ _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
+ "unordered_set::emplace_hint(const_iterator, args...) called with an iterator not"
+ " referring to this unordered_set");
+ return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
+ }
+#else
iterator emplace_hint(const_iterator, _Args&&... __args)
{return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;}
+#endif
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
@@ -434,12 +499,32 @@ public:
{return __table_.__insert_unique(_VSTD::move(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ iterator insert(const_iterator __p, const value_type& __x)
+ {
+ _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
+ "unordered_set::insert(const_iterator, const value_type&) called with an iterator not"
+ " referring to this unordered_set");
+ return insert(__x).first;
+ }
+#else
iterator insert(const_iterator, const value_type& __x)
{return insert(__x).first;}
+#endif
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ iterator insert(const_iterator __p, value_type&& __x)
+ {
+ _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
+ "unordered_set::insert(const_iterator, value_type&&) called with an iterator not"
+ " referring to this unordered_set");
+ return insert(_VSTD::move(__x)).first;
+ }
+#else
iterator insert(const_iterator, value_type&& __x)
{return insert(_VSTD::move(__x)).first;}
+#endif
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
@@ -515,6 +600,20 @@ public:
void rehash(size_type __n) {__table_.rehash(__n);}
_LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
+
+#if _LIBCPP_DEBUG_LEVEL >= 2
+
+ bool __dereferenceable(const const_iterator* __i) const
+ {return __table_.__dereferenceable(__i);}
+ bool __decrementable(const const_iterator* __i) const
+ {return __table_.__decrementable(__i);}
+ bool __addable(const const_iterator* __i, ptrdiff_t __n) const
+ {return __table_.__addable(__i, __n);}
+ bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const
+ {return __table_.__addable(__i, __n);}
+
+#endif // _LIBCPP_DEBUG_LEVEL >= 2
+
};
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -522,6 +621,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n,
const hasher& __hf, const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
}
@@ -530,6 +632,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n,
const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
}
@@ -538,6 +643,9 @@ template <class _InputIterator>
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
_InputIterator __first, _InputIterator __last)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
insert(__first, __last);
}
@@ -548,6 +656,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const hasher& __hf, const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__first, __last);
}
@@ -559,6 +670,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__first, __last);
}
@@ -569,6 +683,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const allocator_type& __a)
: __table_(__a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -576,6 +693,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const unordered_set& __u)
: __table_(__u.__table_)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__u.bucket_count());
insert(__u.begin(), __u.end());
}
@@ -585,6 +705,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const unordered_set& __u, const allocator_type& __a)
: __table_(__u.__table_, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__u.bucket_count());
insert(__u.begin(), __u.end());
}
@@ -598,6 +721,10 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
: __table_(_VSTD::move(__u.__table_))
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+ __get_db()->swap(this, &__u);
+#endif
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -605,12 +732,19 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
unordered_set&& __u, const allocator_type& __a)
: __table_(_VSTD::move(__u.__table_), __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
if (__a != __u.get_allocator())
{
iterator __i = __u.begin();
while (__u.size() != 0)
__table_.__insert_unique(_VSTD::move(__u.__table_.remove(__i++)->__value_));
}
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ else
+ __get_db()->swap(this, &__u);
+#endif
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -621,6 +755,9 @@ template <class _Value, class _Hash, class _Pred, class _Alloc>
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
initializer_list<value_type> __il)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
insert(__il.begin(), __il.end());
}
@@ -630,6 +767,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__il.begin(), __il.end());
}
@@ -640,6 +780,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const key_equal& __eql, const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__il.begin(), __il.end());
}
@@ -725,7 +868,7 @@ operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS unordered_multiset
+class _LIBCPP_TYPE_VIS_ONLY unordered_multiset
{
public:
// types
@@ -736,6 +879,8 @@ public:
typedef _Alloc allocator_type;
typedef value_type& reference;
typedef const value_type& const_reference;
+ static_assert((is_same<value_type, typename allocator_type::value_type>::value),
+ "Invalid allocator::value_type");
private:
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
@@ -756,11 +901,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
unordered_multiset()
_NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
- {} // = default
+ {
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
+ }
explicit unordered_multiset(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
unordered_multiset(size_type __n, const hasher& __hf,
const key_equal& __eql, const allocator_type& __a);
+#if _LIBCPP_STD_VER > 11
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(size_type __n, const allocator_type& __a)
+ : unordered_multiset(__n, hasher(), key_equal(), __a) {}
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(size_type __n, const hasher& __hf, const allocator_type& __a)
+ : unordered_multiset(__n, __hf, key_equal(), __a) {}
+#endif
template <class _InputIterator>
unordered_multiset(_InputIterator __first, _InputIterator __last);
template <class _InputIterator>
@@ -771,6 +928,18 @@ public:
unordered_multiset(_InputIterator __first, _InputIterator __last,
size_type __n , const hasher& __hf,
const key_equal& __eql, const allocator_type& __a);
+#if _LIBCPP_STD_VER > 11
+ template <class _InputIterator>
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n, const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) {}
+ template <class _InputIterator>
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf, const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) {}
+#endif
explicit unordered_multiset(const allocator_type& __a);
unordered_multiset(const unordered_multiset& __u);
unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
@@ -787,6 +956,14 @@ public:
unordered_multiset(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
+#if _LIBCPP_STD_VER > 11
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
+ : unordered_multiset(__il, __n, hasher(), key_equal(), __a) {}
+ inline _LIBCPP_INLINE_VISIBILITY
+ unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const allocator_type& __a)
+ : unordered_multiset(__il, __n, __hf, key_equal(), __a) {}
+#endif
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_multiset() = default;
_LIBCPP_INLINE_VISIBILITY
@@ -925,6 +1102,20 @@ public:
void rehash(size_type __n) {__table_.rehash(__n);}
_LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
+
+#if _LIBCPP_DEBUG_LEVEL >= 2
+
+ bool __dereferenceable(const const_iterator* __i) const
+ {return __table_.__dereferenceable(__i);}
+ bool __decrementable(const const_iterator* __i) const
+ {return __table_.__decrementable(__i);}
+ bool __addable(const const_iterator* __i, ptrdiff_t __n) const
+ {return __table_.__addable(__i, __n);}
+ bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const
+ {return __table_.__addable(__i, __n);}
+
+#endif // _LIBCPP_DEBUG_LEVEL >= 2
+
};
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -932,6 +1123,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
size_type __n, const hasher& __hf, const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
}
@@ -941,6 +1135,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
}
@@ -949,6 +1146,9 @@ template <class _InputIterator>
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
_InputIterator __first, _InputIterator __last)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
insert(__first, __last);
}
@@ -959,6 +1159,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const hasher& __hf, const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__first, __last);
}
@@ -970,6 +1173,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__first, __last);
}
@@ -980,6 +1186,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const allocator_type& __a)
: __table_(__a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -987,6 +1196,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const unordered_multiset& __u)
: __table_(__u.__table_)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__u.bucket_count());
insert(__u.begin(), __u.end());
}
@@ -996,6 +1208,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const unordered_multiset& __u, const allocator_type& __a)
: __table_(__u.__table_, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__u.bucket_count());
insert(__u.begin(), __u.end());
}
@@ -1009,6 +1224,10 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
: __table_(_VSTD::move(__u.__table_))
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+ __get_db()->swap(this, &__u);
+#endif
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -1016,12 +1235,19 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
unordered_multiset&& __u, const allocator_type& __a)
: __table_(_VSTD::move(__u.__table_), __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
if (__a != __u.get_allocator())
{
iterator __i = __u.begin();
while (__u.size() != 0)
__table_.__insert_multi(_VSTD::move(__u.__table_.remove(__i++)->__value_));
}
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ else
+ __get_db()->swap(this, &__u);
+#endif
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -1032,6 +1258,9 @@ template <class _Value, class _Hash, class _Pred, class _Alloc>
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
initializer_list<value_type> __il)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
insert(__il.begin(), __il.end());
}
@@ -1041,6 +1270,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const key_equal& __eql)
: __table_(__hf, __eql)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__il.begin(), __il.end());
}
@@ -1051,6 +1283,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const key_equal& __eql, const allocator_type& __a)
: __table_(__hf, __eql, __a)
{
+#if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+#endif
__table_.rehash(__n);
insert(__il.begin(), __il.end());
}
OpenPOWER on IntegriCloud