Brad Roberts:

I have one semi-large code base where I validate the locking semantics by adding assert(!lock.try_acquire)'s. That's clearly a side effect, but also clearly should never have one if the code is correct.

I see, and you can't you use a special library-defined assert for that purpose.

Bye,
bearophile

Reply via email to