@@ -1349,7 +1349,7 @@ __tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_from_tree(__tree
1349
1349
__t ->__size_ = 0 ;
1350
1350
// __cache->__left_ == nullptr
1351
1351
if (__cache->__right_ != nullptr )
1352
- __cache = static_cast <__node_pointer>(__cache->__right_ );
1352
+ __cache = std::__static_fancy_pointer_cast <__node_pointer>(__cache->__right_ );
1353
1353
// __cache->__left_ == nullptr
1354
1354
// __cache->__right_ == nullptr
1355
1355
return __cache;
@@ -1364,16 +1364,16 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 typename __tree<_Tp, _Compare, _Allocator>::__node
1364
1364
__tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_pointer __cache) _NOEXCEPT {
1365
1365
if (__cache->__parent_ == nullptr )
1366
1366
return nullptr ;
1367
- if (std::__tree_is_left_child (static_cast <__node_base_pointer>(__cache))) {
1367
+ if (std::__tree_is_left_child (std::__static_fancy_pointer_cast <__node_base_pointer>(__cache))) {
1368
1368
__cache->__parent_ ->__left_ = nullptr ;
1369
- __cache = static_cast <__node_pointer>(__cache->__parent_ );
1369
+ __cache = std::__static_fancy_pointer_cast <__node_pointer>(__cache->__parent_ );
1370
1370
if (__cache->__right_ == nullptr )
1371
1371
return __cache;
1372
1372
return static_cast <__node_pointer>(std::__tree_leaf (__cache->__right_ ));
1373
1373
}
1374
1374
// __cache is right child
1375
1375
__cache->__parent_unsafe ()->__right_ = nullptr ;
1376
- __cache = static_cast <__node_pointer>(__cache->__parent_ );
1376
+ __cache = std::__static_fancy_pointer_cast <__node_pointer>(__cache->__parent_ );
1377
1377
if (__cache->__left_ == nullptr )
1378
1378
return __cache;
1379
1379
return static_cast <__node_pointer>(std::__tree_leaf (__cache->__left_ ));
@@ -1637,7 +1637,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_leaf_high(__end_node_pointer& __parent
1637
1637
if (__nd->__right_ != nullptr )
1638
1638
__nd = static_cast <__node_pointer>(__nd->__right_ );
1639
1639
else {
1640
- __parent = static_cast <__end_node_pointer>(__nd);
1640
+ __parent = std::__static_fancy_pointer_cast <__end_node_pointer>(__nd);
1641
1641
return __nd->__right_ ;
1642
1642
}
1643
1643
}
@@ -1668,7 +1668,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_leaf(
1668
1668
return __parent->__left_ ;
1669
1669
} else {
1670
1670
__parent = static_cast <__end_node_pointer>(__prior.__ptr_ );
1671
- return static_cast <__node_base_pointer>(__prior.__ptr_ )->__right_ ;
1671
+ return std::__static_fancy_pointer_cast <__node_base_pointer>(__prior.__ptr_ )->__right_ ;
1672
1672
}
1673
1673
}
1674
1674
// __v < *prev(__hint)
@@ -1976,7 +1976,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p, _Arg
1976
1976
__node_holder __h = __construct_node (std::forward<_Args>(__args)...);
1977
1977
__end_node_pointer __parent;
1978
1978
__node_base_pointer& __child = __find_leaf (__p, __parent, __h->__value_ );
1979
- __insert_node_at (__parent, __child, static_cast <__node_base_pointer>(__h.get ()));
1979
+ __insert_node_at (__parent, __child, std::__static_fancy_pointer_cast <__node_base_pointer>(__h.get ()));
1980
1980
return iterator (static_cast <__node_pointer>(__h.release ()));
1981
1981
}
1982
1982
@@ -2001,7 +2001,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 typename __tree<_Tp, _Compare, _Allocator>::iterat
2001
2001
__tree<_Tp, _Compare, _Allocator>::__node_insert_multi(__node_pointer __nd) {
2002
2002
__end_node_pointer __parent;
2003
2003
__node_base_pointer& __child = __find_leaf_high (__parent, __nd->__value_ );
2004
- __insert_node_at (__parent, __child, static_cast <__node_base_pointer>(__nd));
2004
+ __insert_node_at (__parent, __child, std::__static_fancy_pointer_cast <__node_base_pointer>(__nd));
2005
2005
return iterator (__nd);
2006
2006
}
2007
2007
0 commit comments