On Saturday, 1 November 2014 at 11:43:28 UTC, Nordlöw wrote:
if (!x.empty)
    if (auto front = x.stealFront)
    {
        front.doStuff;
    }

This is more functional/atomic, that is it reduces the risk of accidentally forgetting to call popFront at the end.

Forgot my explicit question:

So why isn't something like x.stealFront already in Phobos?

Reply via email to