@@ -794,9 +794,9 @@ public:
794
794
795
795
private:
796
796
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit __tree_const_iterator (__node_pointer __p) _NOEXCEPT
797
- : __ptr_(__p) {}
797
+ : __ptr_(std::__static_fancy_pointer_cast<__end_node_pointer>( __p) ) {}
798
798
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit __tree_const_iterator (__end_node_pointer __p) _NOEXCEPT
799
- : __ptr_(__p) {}
799
+ : __ptr_(std::__static_fancy_pointer_cast<__end_node_pointer>( __p) ) {}
800
800
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __node_pointer __get_np () const {
801
801
return std::__static_fancy_pointer_cast<__node_pointer>(__ptr_);
802
802
}
@@ -2328,13 +2328,13 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26
2328
2328
__node_pointer __rt = __root ();
2329
2329
while (__rt != nullptr ) {
2330
2330
if (value_comp ()(__k, __rt->__value_ )) {
2331
- __result = static_cast <__end_node_pointer>(__rt);
2332
- __rt = static_cast <__node_pointer>(__rt->__left_ );
2331
+ __result = std::__static_fancy_pointer_cast <__end_node_pointer>(__rt);
2332
+ __rt = std::__static_fancy_pointer_cast <__node_pointer>(__rt->__left_ );
2333
2333
} else if (value_comp ()(__rt->__value_ , __k))
2334
- __rt = static_cast <__node_pointer>(__rt->__right_ );
2334
+ __rt = std::__static_fancy_pointer_cast <__node_pointer>(__rt->__right_ );
2335
2335
else
2336
2336
return _Pp (iterator (__rt),
2337
- iterator (__rt->__right_ != nullptr ? static_cast <__end_node_pointer>(std::__tree_min (__rt->__right_ ))
2337
+ iterator (__rt->__right_ != nullptr ? std::__static_fancy_pointer_cast <__end_node_pointer>(std::__tree_min (__rt->__right_ ))
2338
2338
: __result));
2339
2339
}
2340
2340
return _Pp (iterator (__result), iterator (__result));
@@ -2350,15 +2350,15 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const {
2350
2350
__node_pointer __rt = __root ();
2351
2351
while (__rt != nullptr ) {
2352
2352
if (value_comp ()(__k, __rt->__value_ )) {
2353
- __result = static_cast <__end_node_pointer>(__rt);
2354
- __rt = static_cast <__node_pointer>(__rt->__left_ );
2353
+ __result = std::__static_fancy_pointer_cast <__end_node_pointer>(__rt);
2354
+ __rt = std::__static_fancy_pointer_cast <__node_pointer>(__rt->__left_ );
2355
2355
} else if (value_comp ()(__rt->__value_ , __k))
2356
- __rt = static_cast <__node_pointer>(__rt->__right_ );
2356
+ __rt = std::__static_fancy_pointer_cast <__node_pointer>(__rt->__right_ );
2357
2357
else
2358
2358
return _Pp (
2359
2359
const_iterator (__rt),
2360
2360
const_iterator (
2361
- __rt->__right_ != nullptr ? static_cast <__end_node_pointer>(std::__tree_min (__rt->__right_ )) : __result));
2361
+ __rt->__right_ != nullptr ? std::__static_fancy_pointer_cast <__end_node_pointer>(std::__tree_min (__rt->__right_ )) : __result));
2362
2362
}
2363
2363
return _Pp (const_iterator (__result), const_iterator (__result));
2364
2364
}
0 commit comments