Replacement for AVR libc ATOMIC_BLOCK macros, now for DUE and other platforms.

I suspect you misunderstood the question. But it doesn't matter. The C++ standard states the destructor has to be called at the end of the block.