From: "David Abrahams" <[EMAIL PROTECTED]>
> > "Peter Dimov" <[EMAIL PROTECTED]> wrote in message
> > 004501c2c6f8$970c7400$1d00a8c0@pdimov2">news:004501c2c6f8$970c7400$1d00a8c0@pdimov2...
> >> From: "David B. Held" <[EMAIL PROTECTED]>
> >> [...]
> >> Nope, but I want my sink strongly exception safe; the pointer should
> >> be deleted when a policy constructor throws.
>
> BTW, this is also not the "strong guarantee" (I dunno, maybe people
> mean something else by "strongly exception safe" -- is there a
> definition somewhere?)

Can't get away with colloquialisms.

Yep, I am very wrong if the sink is smart_ptr::smart_ptr. Strong guarantee
here means do-nothing, which is exactly what the current smart_ptr does,
leak and all.

I am less wrong if the sink is the expression

smart_ptr<> px(new X);

although this can give the strong guarantee only if "delete new X" has no
observable side effects; so "basic guarantee" is probably more precise.

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.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to