diff options
Diffstat (limited to 'libcxx/include/__tree')
-rw-r--r-- | libcxx/include/__tree | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 18363dc5378..7def15492de 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -343,7 +343,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) // but copy __z's color. This does not impact __x or __w. if (__y != __z) { - // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr + // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr __y->__parent_ = __z->__parent_; if (__tree_is_left_child(__z)) __y->__parent_->__left_ = __y; @@ -413,8 +413,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z) } // reset sibling, and it still can't be null __w = __tree_is_left_child(__x) ? - __x->__parent_->__right_ : - __x->__parent_->__left_; + __x->__parent_->__right_ : + __x->__parent_->__left_; // continue; } else // __w has a red child @@ -465,8 +465,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z) } // reset sibling, and it still can't be null __w = __tree_is_left_child(__x) ? - __x->__parent_->__right_ : - __x->__parent_->__left_; + __x->__parent_->__right_ : + __x->__parent_->__left_; // continue; } else // __w has a red child @@ -496,7 +496,6 @@ __tree_remove(_NodePtr __root, _NodePtr __z) template <class> class __map_node_destructor; - template <class _Allocator> class __tree_node_destructor { @@ -594,10 +593,10 @@ public: template <class ..._Args> explicit __tree_node(_Args&& ...__args) : __value_(_STD::forward<_Args>(__args)...) {} -#else +#else // _LIBCPP_MOVE explicit __tree_node(const value_type& __v) : __value_(__v) {} -#endif +#endif // _LIBCPP_MOVE }; template <class> class __map_iterator; @@ -832,7 +831,7 @@ public: __tree(__tree&& __t); __tree(__tree&& __t, const allocator_type& __a); __tree& operator=(__tree&& __t); -#endif +#endif // _LIBCPP_MOVE ~__tree(); @@ -870,13 +869,13 @@ public: iterator __insert_multi(_V&& __v); template <class _V> iterator __insert_multi(const_iterator __p, _V&& __v); -#else +#else // _LIBCPP_MOVE pair<iterator, bool> __insert_unique(const value_type& __v); iterator __insert_unique(const_iterator __p, const value_type& __v); iterator __insert_multi(const value_type& __v); iterator __insert_multi(const_iterator __p, const value_type& __v); -#endif +#endif // _LIBCPP_MOVE pair<iterator, bool> __node_insert_unique(__node_pointer __nd); iterator __node_insert_unique(const_iterator __p, @@ -971,7 +970,7 @@ private: #ifdef _LIBCPP_MOVE template <class ..._Args> __node_holder __construct_node(_Args&& ...__args); -#else +#else // _LIBCPP_MOVE __node_holder __construct_node(const value_type& __v); #endif @@ -1105,7 +1104,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1122,7 +1121,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1145,7 +1144,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1162,7 +1161,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1264,7 +1263,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS while (__cache != nullptr && __t.size() != 0) { __cache->__value_ = _STD::move(__t.remove(__t.begin())->__value_); @@ -1281,7 +1280,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1303,7 +1302,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) return *this; } -#endif +#endif // _LIBCPP_MOVE template <class _Tp, class _Compare, class _Allocator> __tree<_Tp, _Compare, _Allocator>::~__tree() @@ -1727,7 +1726,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v) return iterator(__h.release()); } -#else +#else // _LIBCPP_MOVE template <class _Tp, class _Compare, class _Allocator> typename __tree<_Tp, _Compare, _Allocator>::__node_holder @@ -1796,7 +1795,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const valu return iterator(__h.release()); } -#endif +#endif // _LIBCPP_MOVE template <class _Tp, class _Compare, class _Allocator> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> |