Restrict Combination of moveFront and popFront to Suitable Element Types
    "Nordlöw" via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sat Nov  1 14:26:48 PDT 2014
    
    
  
As a follow-up question to
http://forum.dlang.org/thread/jkbhlezbcrufowxtthmy@forum.dlang.org?page=3#post-zyuqclyjitbhavemmwto:40forum.dlang.org
discussing the motivation for a new range primitive stealFront 
that combines moveFront and popFront implemented at
https://github.com/nordlow/justd/blob/master/range_ex.d#L14
I then wonder if there's a way to check, using a type-trait, 
whether the value returned from moveFront is safe to use after 
popFront has been called on it. If so I want to restrict 
stealFront/Back with this trait.
    
    
More information about the Digitalmars-d-learn
mailing list