.sort vs sort(): std.algorithm not up to the task?

Andrew Edwards via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 8 01:30:10 PDT 2017


On Thursday, 8 June 2017 at 07:23:27 UTC, Jonathan M Davis wrote:
>
> release is a member of SortedRange. You don't have to import it 
> separately. You have it automatically by virtue of the fact 
> that sort returns a SortedRange. And unlike calling array, it 
> doesn't copy the entire range or allocate.
>

sorry, I missed that after accidentally making the change in on 
file and compiled another.

> having it return SortedRange is beneficial overall, and calling 
> release to get the original out is as short as passing a 
> template argument like you're suggesting.

a point I missed do to the aforementioned mistake.

Thanks for the assist,
Andrew




More information about the Digitalmars-d-learn mailing list