Skip to content

Commit f5a26ab

Browse files
map.ops/upper_bound.pass.cpp
1 parent be3ac37 commit f5a26ab

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
@@ -2295,10 +2295,10 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 typename __tree<_Tp, _Compare, _Allocator>::iterat
22952295
__tree<_Tp, _Compare, _Allocator>::__upper_bound(const _Key& __v, __node_pointer __root, __end_node_pointer __result) {
22962296
while (__root != nullptr) {
22972297
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_);
23002300
} else
2301-
__root = static_cast<__node_pointer>(__root->__right_);
2301+
__root = std::__static_fancy_pointer_cast<__node_pointer>(__root->__right_);
23022302
}
23032303
return iterator(__result);
23042304
}
@@ -2310,10 +2310,10 @@ __tree<_Tp, _Compare, _Allocator>::__upper_bound(
23102310
const _Key& __v, __node_pointer __root, __end_node_pointer __result) const {
23112311
while (__root != nullptr) {
23122312
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_);
23152315
} else
2316-
__root = static_cast<__node_pointer>(__root->__right_);
2316+
__root = std::__static_fancy_pointer_cast<__node_pointer>(__root->__right_);
23172317
}
23182318
return const_iterator(__result);
23192319
}

0 commit comments

Comments
 (0)