diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index e2ddb94..0c00e9a 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -120,7 +120,7 @@ public: { if (px == 0) // need to allocate new counter -- the cast failed { - pn = detail::shared_count(static_cast(0), deleter()); + pn = detail::shared_count(); } } diff --git a/shared_ptr.htm b/shared_ptr.htm index ae1c36d..ff3e5aa 100644 --- a/shared_ptr.htm +++ b/shared_ptr.htm @@ -347,7 +347,7 @@ q = p;

Returns: A shared_ptr<T> object that stores a copy of polymorphic_cast<T*>(r.get()) and shares ownership with r.

-

Throws: std::bad_cast.

+

Throws: std::bad_cast when the pointer cannot be converted.

Exception safety: If an exception is thrown, the function has no effect.

shared_polymorphic_downcast