Checking function parameters in Phobos

Meta jared771 at gmail.com
Wed Nov 20 13:42:39 PST 2013


On Wednesday, 20 November 2013 at 20:06:47 UTC, Andrei 
Alexandrescu wrote:
> That wouldn't help much - people have access to the underlying 
> range anyway.
>
> Andrei

You're right, I forgot about that. However, people generally 
won't be modifying a SortedRange in place, will they? Even if 
they do, it'll probably be using one of the mutating functions in 
std.algorithm. Also, somewhat related, couldn't 
std.algorithm.sort simply return the passed-in range if that 
range is already wrapped with SortedRange?


More information about the Digitalmars-d mailing list