D-Programming-Language/phobos — pull request #829 by monarchdodra (2012-10-02 12:50:00+00:00)
Title: Tweak in /pop(Front|Back)N/

Just some teeny tiny fixes:

1. Added a cast(size_t) in popFrontN for the odd ranges that return something bigger than a size_t. Note that popBackN already had this "fix"
2. Gave popBackN the same optimization for nonSliceable ranges that have length (avoids checking empty every time). This applies for ranges such as "take".
3. Enriched documentation (and corresponding unittest), to stress /pop(Front|Back)N/'s safety regarding over-emptying a range.