forked from boostorg/intrusive
Fix UB when downcasting null pointers, use pointer_trait' specialized function
This commit is contained in:
1 parent
f11301c5b5
commit
fc46064c29
1 file changed
+1
-1
@@ -591,7 +591,7 @@ inline typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::typ
|
||||
dcast_bucket_ptr(const SlistNodePtr &p)
|
||||
{
|
||||
typedef typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type node_ptr;
|
||||
return pointer_traits<node_ptr>::pointer_to(static_cast<Node&>(*p));
|
||||
return pointer_traits<node_ptr>::static_cast_from(p);
|
||||
}
|
||||
|
||||
template<class NodeTraits>
|
||||
|
||||
Reference in new issue
Block a user