|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-29 10:20:11
"Peter Dimov" <pdimov_at_[hidden]> writes:
> From: "David Abrahams" <dave_at_[hidden]>
>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>
>> > And I'm even less wrong if the sink is
>> >
>> > px.reset(new X);
>> >
>> > since "basic guarantee" here says nothing about px after the exception.
> The
>> > exception safety of this construct has no name, it's somewhere between
> basic
>> > and strong.
>>
>> Not sure what you expect the behavior to be in the face of an
>> exception, but I can't see why you say that neither named guarantee
>> applies here.
>
> The behavior, at least in shared_ptr's case, is that the pointer is deleted,
> but there are no other effects, i.e. px is left unchanged.
Then for the whole expression, "px.reset(new X)", it's the strong
guarantee.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk