c++ Programming Glossary: myvec.size
The simplest and neatest c++11 ScopeGuard http://stackoverflow.com/questions/10270328/the-simplest-and-neatest-c11-scopeguard catch ... AssertMsg myVec.size 0 someOtherVec.size 0 rollback did not work shouldThrow false.. AssertMsg myVec.size 1 someOtherVec.size 1 unexpected end state shouldThrow true.. catch ... AssertMsg myVec.size 0 someOtherVec.size 0 rollback did not work void SomeFuncThatShouldBehaveAtomicallyInCaseOfExceptionsUsingScopeGuardsThatDoesNOTRollbackIfAdquireThrows..
What do I need to do before deleting elements in a vector of pointers to dynamically allocated objects? http://stackoverflow.com/questions/4061438/what-do-i-need-to-do-before-deleting-elements-in-a-vector-of-pointers-to-dynamic index as you iterate over all elements. Ex for int i 0 i myVec.size i delete myVec i With that said if you're planning on storing..
|