Boost logo

Boost :

Subject: Re: [boost] [contract] Strong exception safety guarantees
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2016-07-15 03:35:30

2016-07-15 6:04 GMT+02:00 Lorenzo Caminiti <lorcaminiti_at_[hidden]>:

> Hello all,
> I've been considering adding a .except(...) construct to
> Boost.Contract that will allow to specify conditions to check at
> function exit but when the function body throws (in contrast to
> postconditions that are checked at function exit but only when the
> function body does not throw).
> I think .except(...) could be used to assert strong exception safety
> guarantees... (note that class invariants are already checked at exit
> of public functions and also when the public function bodies throw,
> but invariants are suited to assert only basic, and not strong,
> exception safety guarantees).

How would you express the strong guarantee on std::vector::push_back?


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