|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-09-17 15:32:23
At 12:09 PM 9/17/2002, David Abrahams wrote:
>
>From: "Peter Dimov" <pdimov_at_[hidden]>
>
>> Also, smart_ptr.htm says that
>>
>> "The only exception ever thrown by functions which do throw (assuming T
>> meets the common requirements) is std::bad_alloc, and that is thrown
only
>by
>> functions which are explicitly documented as possibly throwing
>> std::bad_alloc."
>>
>> but this is too strict. For instance, in some implementations the
>shared_ptr
>> constructor can fail if it cannot create the mutex that protects the
>> reference count.
>>
>> Comments? Rationale for the original text?
>
>All I can say was that it was true with the original non-threadsafe
>shared_ptr design.
I think that I may have written it, or been involved with writing it. It
would have been written to cover the original design, as Dave says.
The intent was probably to indicate what the smart point implementation
itself might throw. If they don't already do so, the docs should also
discuss exceptions which could be thrown by operations on the templated
type.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk