Boost logo

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at