aboutsummaryrefslogtreecommitdiff
path: root/system/include/libcxx/__tree
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libcxx/__tree')
-rw-r--r--system/include/libcxx/__tree82
1 files changed, 42 insertions, 40 deletions
diff --git a/system/include/libcxx/__tree b/system/include/libcxx/__tree
index 6c4b6e60..bd38b4f2 100644
--- a/system/include/libcxx/__tree
+++ b/system/include/libcxx/__tree
@@ -17,7 +17,9 @@
#include <stdexcept>
#include <algorithm>
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
+#endif
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -612,8 +614,8 @@ public:
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
};
-template <class _TreeIterator> class __map_iterator;
-template <class _TreeIterator> class __map_const_iterator;
+template <class _TreeIterator> class _LIBCPP_VISIBLE __map_iterator;
+template <class _TreeIterator> class _LIBCPP_VISIBLE __map_const_iterator;
template <class _Tp, class _NodePtr, class _DiffType>
class _LIBCPP_VISIBLE __tree_iterator
@@ -930,14 +932,14 @@ public:
__emplace_hint_multi(const_iterator __p, _Args&&... __args);
#endif // _LIBCPP_HAS_NO_VARIADICS
- template <class _V>
- pair<iterator, bool> __insert_unique(_V&& __v);
- template <class _V>
- iterator __insert_unique(const_iterator __p, _V&& __v);
- template <class _V>
- iterator __insert_multi(_V&& __v);
- template <class _V>
- iterator __insert_multi(const_iterator __p, _V&& __v);
+ template <class _Vp>
+ pair<iterator, bool> __insert_unique(_Vp&& __v);
+ template <class _Vp>
+ iterator __insert_unique(const_iterator __p, _Vp&& __v);
+ template <class _Vp>
+ iterator __insert_multi(_Vp&& __v);
+ template <class _Vp>
+ iterator __insert_multi(const_iterator __p, _Vp&& __v);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
pair<iterator, bool> __insert_unique(const value_type& __v);
@@ -1019,8 +1021,8 @@ public:
pair<const_iterator, const_iterator>
__equal_range_multi(const _Key& __k) const;
- typedef __tree_node_destructor<__node_allocator> _D;
- typedef unique_ptr<__node, _D> __node_holder;
+ typedef __tree_node_destructor<__node_allocator> _Dp;
+ typedef unique_ptr<__node, _Dp> __node_holder;
__node_holder remove(const_iterator __p) _NOEXCEPT;
private:
@@ -1709,7 +1711,7 @@ typename __tree<_Tp, _Compare, _Allocator>::__node_holder
__tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&& ...__args)
{
__node_allocator& __na = __node_alloc();
- __node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
+ __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), _VSTD::forward<_Args>(__args)...);
__h.get_deleter().__value_constructed = true;
return __h;
@@ -1779,11 +1781,11 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
#endif // _LIBCPP_HAS_NO_VARIADICS
template <class _Tp, class _Compare, class _Allocator>
-template <class _V>
+template <class _Vp>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
-__tree<_Tp, _Compare, _Allocator>::__insert_unique(_V&& __v)
+__tree<_Tp, _Compare, _Allocator>::__insert_unique(_Vp&& __v)
{
- __node_holder __h = __construct_node(_VSTD::forward<_V>(__v));
+ __node_holder __h = __construct_node(_VSTD::forward<_Vp>(__v));
pair<iterator, bool> __r = __node_insert_unique(__h.get());
if (__r.second)
__h.release();
@@ -1791,11 +1793,11 @@ __tree<_Tp, _Compare, _Allocator>::__insert_unique(_V&& __v)
}
template <class _Tp, class _Compare, class _Allocator>
-template <class _V>
+template <class _Vp>
typename __tree<_Tp, _Compare, _Allocator>::iterator
-__tree<_Tp, _Compare, _Allocator>::__insert_unique(const_iterator __p, _V&& __v)
+__tree<_Tp, _Compare, _Allocator>::__insert_unique(const_iterator __p, _Vp&& __v)
{
- __node_holder __h = __construct_node(_VSTD::forward<_V>(__v));
+ __node_holder __h = __construct_node(_VSTD::forward<_Vp>(__v));
iterator __r = __node_insert_unique(__p, __h.get());
if (__r.__ptr_ == __h.get())
__h.release();
@@ -1803,11 +1805,11 @@ __tree<_Tp, _Compare, _Allocator>::__insert_unique(const_iterator __p, _V&& __v)
}
template <class _Tp, class _Compare, class _Allocator>
-template <class _V>
+template <class _Vp>
typename __tree<_Tp, _Compare, _Allocator>::iterator
-__tree<_Tp, _Compare, _Allocator>::__insert_multi(_V&& __v)
+__tree<_Tp, _Compare, _Allocator>::__insert_multi(_Vp&& __v)
{
- __node_holder __h = __construct_node(_VSTD::forward<_V>(__v));
+ __node_holder __h = __construct_node(_VSTD::forward<_Vp>(__v));
__node_base_pointer __parent;
__node_base_pointer& __child = __find_leaf_high(__parent, __h->__value_);
__insert_node_at(__parent, __child, __h.get());
@@ -1815,11 +1817,11 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(_V&& __v)
}
template <class _Tp, class _Compare, class _Allocator>
-template <class _V>
+template <class _Vp>
typename __tree<_Tp, _Compare, _Allocator>::iterator
-__tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v)
+__tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _Vp&& __v)
{
- __node_holder __h = __construct_node(_VSTD::forward<_V>(__v));
+ __node_holder __h = __construct_node(_VSTD::forward<_Vp>(__v));
__node_base_pointer __parent;
__node_base_pointer& __child = __find_leaf(__p, __parent, __h->__value_);
__insert_node_at(__parent, __child, __h.get());
@@ -1833,7 +1835,7 @@ typename __tree<_Tp, _Compare, _Allocator>::__node_holder
__tree<_Tp, _Compare, _Allocator>::__construct_node(const value_type& __v)
{
__node_allocator& __na = __node_alloc();
- __node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
+ __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), __v);
__h.get_deleter().__value_constructed = true;
return _VSTD::move(__h);
@@ -2051,7 +2053,7 @@ template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const
{
- typedef pair<const_iterator, const_iterator> _P;
+ typedef pair<const_iterator, const_iterator> _Pp;
__node_const_pointer __result = __end_node();
__node_const_pointer __rt = __root();
while (__rt != nullptr)
@@ -2158,7 +2160,7 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::iterator,
typename __tree<_Tp, _Compare, _Allocator>::iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k)
{
- typedef pair<iterator, iterator> _P;
+ typedef pair<iterator, iterator> _Pp;
__node_pointer __result = __end_node();
__node_pointer __rt = __root();
while (__rt != nullptr)
@@ -2171,13 +2173,13 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k)
else if (value_comp()(__rt->__value_, __k))
__rt = static_cast<__node_pointer>(__rt->__right_);
else
- return _P(iterator(__rt),
+ return _Pp(iterator(__rt),
iterator(
__rt->__right_ != nullptr ?
static_cast<__node_pointer>(__tree_min(__rt->__right_))
: __result));
}
- return _P(iterator(__result), iterator(__result));
+ return _Pp(iterator(__result), iterator(__result));
}
template <class _Tp, class _Compare, class _Allocator>
@@ -2186,7 +2188,7 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator,
typename __tree<_Tp, _Compare, _Allocator>::const_iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const
{
- typedef pair<const_iterator, const_iterator> _P;
+ typedef pair<const_iterator, const_iterator> _Pp;
__node_const_pointer __result = __end_node();
__node_const_pointer __rt = __root();
while (__rt != nullptr)
@@ -2199,13 +2201,13 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const
else if (value_comp()(__rt->__value_, __k))
__rt = static_cast<__node_const_pointer>(__rt->__right_);
else
- return _P(const_iterator(__rt),
+ return _Pp(const_iterator(__rt),
const_iterator(
__rt->__right_ != nullptr ?
static_cast<__node_const_pointer>(__tree_min(__rt->__right_))
: __result));
}
- return _P(const_iterator(__result), const_iterator(__result));
+ return _Pp(const_iterator(__result), const_iterator(__result));
}
template <class _Tp, class _Compare, class _Allocator>
@@ -2214,7 +2216,7 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::iterator,
typename __tree<_Tp, _Compare, _Allocator>::iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k)
{
- typedef pair<iterator, iterator> _P;
+ typedef pair<iterator, iterator> _Pp;
__node_pointer __result = __end_node();
__node_pointer __rt = __root();
while (__rt != nullptr)
@@ -2227,10 +2229,10 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k)
else if (value_comp()(__rt->__value_, __k))
__rt = static_cast<__node_pointer>(__rt->__right_);
else
- return _P(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), __rt),
+ return _Pp(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), __rt),
__upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result));
}
- return _P(iterator(__result), iterator(__result));
+ return _Pp(iterator(__result), iterator(__result));
}
template <class _Tp, class _Compare, class _Allocator>
@@ -2239,7 +2241,7 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator,
typename __tree<_Tp, _Compare, _Allocator>::const_iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k) const
{
- typedef pair<const_iterator, const_iterator> _P;
+ typedef pair<const_iterator, const_iterator> _Pp;
__node_const_pointer __result = __end_node();
__node_const_pointer __rt = __root();
while (__rt != nullptr)
@@ -2252,10 +2254,10 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k) const
else if (value_comp()(__rt->__value_, __k))
__rt = static_cast<__node_const_pointer>(__rt->__right_);
else
- return _P(__lower_bound(__k, static_cast<__node_const_pointer>(__rt->__left_), __rt),
+ return _Pp(__lower_bound(__k, static_cast<__node_const_pointer>(__rt->__left_), __rt),
__upper_bound(__k, static_cast<__node_const_pointer>(__rt->__right_), __result));
}
- return _P(const_iterator(__result), const_iterator(__result));
+ return _Pp(const_iterator(__result), const_iterator(__result));
}
template <class _Tp, class _Compare, class _Allocator>
@@ -2273,7 +2275,7 @@ __tree<_Tp, _Compare, _Allocator>::remove(const_iterator __p) _NOEXCEPT
--size();
__tree_remove(__end_node()->__left_,
static_cast<__node_base_pointer>(__np));
- return __node_holder(__np, _D(__node_alloc()));
+ return __node_holder(__np, _Dp(__node_alloc()));
}
template <class _Tp, class _Compare, class _Allocator>