|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-01-02 12:43:49
"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.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk