|
Boost : |
From: Rani Sharoni (rani_sharoni_at_[hidden])
Date: 2004-01-02 17:00:06
David Abrahams wrote:
> "Rani Sharoni" <rani_sharoni_at_[hidden]> writes:
>
>> I can't really understand the invariants of the basic_format class
>> but I suspect that its copy assignment operator has exceptions
>> safety issue. In case that the operator= is exception safe then it
>> only provides the basic guarantee and I wondered if it's was
>> intentional?
>> Anyway, AFAIKT this function can easily provide the strong guarantee
>> using the usual swap idiom without any drawback.
>
> The "usual swap" idiom has "usual" drawbacks. Why are they
> inapplicable in this case? Strong assignment can always be built on
> basic assignment after-the-fact.
I explicitly talked about this case in which the throwing operations are the
two std::vector assignments. Do you agree that this specific assignment
operator is not exception safe and is there any problem to provide the
strong guarantee in this case?
http://www.boost.org/boost/format/format_implementation.hpp
Rani
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk