From adc3ec3851eb3d86b99a55db8cee7783f195f194 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 15 Feb 2002 14:19:30 +0000 Subject: [PATCH] Fixes. [SVN r12816] --- include/boost/shared_ptr.hpp | 2 +- shared_ptr.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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