@@ -2295,10 +2295,10 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 typename __tree<_Tp, _Compare, _Allocator>::iterat
2295
2295
__tree<_Tp, _Compare, _Allocator>::__upper_bound(const _Key& __v, __node_pointer __root, __end_node_pointer __result) {
2296
2296
while (__root != nullptr ) {
2297
2297
if (value_comp ()(__v, __root->__value_ )) {
2298
- __result = static_cast <__end_node_pointer>(__root);
2299
- __root = static_cast <__node_pointer>(__root->__left_ );
2298
+ __result = std::__static_fancy_pointer_cast <__end_node_pointer>(__root);
2299
+ __root = std::__static_fancy_pointer_cast <__node_pointer>(__root->__left_ );
2300
2300
} else
2301
- __root = static_cast <__node_pointer>(__root->__right_ );
2301
+ __root = std::__static_fancy_pointer_cast <__node_pointer>(__root->__right_ );
2302
2302
}
2303
2303
return iterator (__result);
2304
2304
}
@@ -2310,10 +2310,10 @@ __tree<_Tp, _Compare, _Allocator>::__upper_bound(
2310
2310
const _Key& __v, __node_pointer __root, __end_node_pointer __result) const {
2311
2311
while (__root != nullptr ) {
2312
2312
if (value_comp ()(__v, __root->__value_ )) {
2313
- __result = static_cast <__end_node_pointer>(__root);
2314
- __root = static_cast <__node_pointer>(__root->__left_ );
2313
+ __result = std::__static_fancy_pointer_cast <__end_node_pointer>(__root);
2314
+ __root = std::__static_fancy_pointer_cast <__node_pointer>(__root->__left_ );
2315
2315
} else
2316
- __root = static_cast <__node_pointer>(__root->__right_ );
2316
+ __root = std::__static_fancy_pointer_cast <__node_pointer>(__root->__right_ );
2317
2317
}
2318
2318
return const_iterator (__result);
2319
2319
}
0 commit comments