On Friday, 10 January 2014 at 14:31:31 UTC, John Colvin wrote:
or if you want something short and simple, define a free function:auto popFrontRet(R)(ref R range) if(isInputRange!R) { range.popFront(); assert(!range.empty); return range.front; }
*Unless* I'm mistaken, he was asking for something that returns the *popped* element?
Re-reading the question, it does kind of sound a bit ambiguous now.