Skip to content

Commit c695518

Browse files
iterator.pass.cpp
1 parent e9bdbb7 commit c695518

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcxx/include/__tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ template <class _EndNodePtr, class _NodePtr>
191191
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 _EndNodePtr __tree_next_iter(_NodePtr __x) _NOEXCEPT {
192192
_LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
193193
if (__x->__right_ != nullptr)
194-
return static_cast<_EndNodePtr>(std::__tree_min(__x->__right_));
194+
return std::__static_fancy_pointer_cast<_EndNodePtr>(std::__tree_min(__x->__right_));
195195
while (!std::__tree_is_left_child(__x))
196196
__x = __x->__parent_unsafe();
197197
return static_cast<_EndNodePtr>(__x->__parent_);
@@ -204,7 +204,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 _NodePtr __tree_prev_
204204
_LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
205205
if (__x->__left_ != nullptr)
206206
return std::__tree_max(__x->__left_);
207-
_NodePtr __xx = static_cast<_NodePtr>(__x);
207+
_NodePtr __xx = std::__static_fancy_pointer_cast<_NodePtr>(__x);
208208
while (std::__tree_is_left_child(__xx))
209209
__xx = __xx->__parent_unsafe();
210210
return __xx->__parent_unsafe();
@@ -673,7 +673,7 @@ public:
673673
}
674674

675675
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_iterator& operator++() {
676-
__ptr_ = std::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_));
676+
__ptr_ = std::__tree_next_iter<__end_node_pointer>(std::__static_fancy_pointer_cast<__node_base_pointer>(__ptr_));
677677
return *this;
678678
}
679679
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_iterator operator++(int) {
@@ -683,7 +683,7 @@ public:
683683
}
684684

685685
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_iterator& operator--() {
686-
__ptr_ = static_cast<__end_node_pointer>(std::__tree_prev_iter<__node_base_pointer>(__ptr_));
686+
__ptr_ = std::__static_fancy_pointer_cast<__end_node_pointer>(std::__tree_prev_iter<__node_base_pointer>(__ptr_));
687687
return *this;
688688
}
689689
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_iterator operator--(int) {
@@ -762,7 +762,7 @@ public:
762762
}
763763

764764
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_const_iterator& operator++() {
765-
__ptr_ = std::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_));
765+
__ptr_ = std::__tree_next_iter<__end_node_pointer>(std::__static_fancy_pointer_cast<__node_base_pointer>(__ptr_));
766766
return *this;
767767
}
768768

@@ -1821,7 +1821,7 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
18211821
// min_pointer<std::__tree_node_base<min_pointer<void>>>
18221822

18231823
__node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __k);
1824-
__node_pointer __r = static_cast<__node_pointer>(__child);
1824+
__node_pointer __r = std::__static_fancy_pointer_cast<__node_pointer>(__child);
18251825
bool __inserted = false;
18261826
if (__child == nullptr) {
18271827
__node_holder __h = __construct_node(std::forward<_Args>(__args)...);

0 commit comments

Comments
 (0)