Boost logo

Boost :

From: Oleg Abrosimov (olegabr_at_[hidden])
Date: 2007-08-16 11:16:09

I don't have time for the full review, sorry.
Just one bug report to help you:

     // Step 2: append the person to the m_persons.

     BOOST_SCOPE_EXIT( (commit)(m_persons) )

The standard in section 23.1 "Container requirements" says that:
"if an exception is thrown by a push_back() or push_front() function,
that function has no effects"

it means that the code above is buggy - in a case of exception in a copy
constructor of Person it removes one element from a container. In other
words, if before push_back m_persons.size() was 1, after scope_exit body
execution m_persons.size() == 0.

I'm not sure if I can vote with such a little effort involved, but if I
could, I vote to accept this library into boost.

Best regards,
Oleg Abrosimov

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