Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-06-11 10:27:32

From: "Brad King" <brad.king_at_[hidden]>

> However, with this implementation:
> const number operator++(int) {
> return number(*this, postfix_increment());
> }
> the original value is not incremented until after the construction
> finishes. With the return value optimization present, this satisfies the
> strong exception guarantee.

Uh, not unless number's copy constructor gives the nothrow guarantee. You
can't count on the NRVO.


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