Boost logo

Boost :

From: Joseph Gauterin (joseph.gauterin_at_[hidden])
Date: 2007-08-16 11:25:45

It is my understanding that if the 'push_back' throws, then program
flow will never reach the BOOST_SCOPE_EXIT block, so the internal
scope exits object will never be created, so it won't erroneously
remove an element.

This code would exhibit the behaviour you describe:

  BOOST_SCOPE_EXIT( (commit)(m_persons) )

but the original looks safe to me.

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