Boston D Meetup: Strawman Structs

Moritz Maxeiner via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jul 23 06:50:23 PDT 2017


On Sunday, 23 July 2017 at 02:15:18 UTC, Steven Schveighoffer 
wrote:
>
> struct StrawmanRange(T)
> {
>   ...
>   void popFront() {}
> }

How do you deal with ranges where `.popFront` returns the old 
front element (`.front` requires copying the front element if the 
caller wants to store it, `.popFront` can move it)?


More information about the Digitalmars-d-announce mailing list