diff --git a/include/memory b/include/memory --- a/include/memory +++ b/include/memory @@ -4629,6 +4629,12 @@ return shared_ptr<_Tp>(__r, const_cast<_RTp*>(__r.get())); } +template +shared_ptr<_Tp> reinterpret_pointer_cast(const shared_ptr<_UP>& __r) _NOEXCEPT +{ + return shared_ptr<_Tp>(__r, reinterpret_cast<_Tp*>(__r.get())); +} + #ifndef _LIBCPP_NO_RTTI template