Should this work?
    monarch_dodra 
    monarchdodra at gmail.com
       
    Fri Jan 10 07:05:16 PST 2014
    
    
  
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.
    
    
More information about the Digitalmars-d
mailing list