|
|
|
|
|
by mojuba
4512 days ago
|
|
Wouldn't this be exception-safe, provided lock_iter defines a ctor, dtor, operator bool() and operator ++()? #define LOCKED(lk) for (lock_iter i = lk; i; i++)
(Edit: I thought lock_iter could be an empty class but no, it can not, so I edited my post. lock_iter will have an internal flag that should be optimized away following the same logic int i is optimized in the OP's version) |
|