On 06/03/2017 01:03 PM, Russel Winder via Digitalmars-d wrote:
Björn Fahller has done compile time sort in C++17 here http://playfulpr
ogramming.blogspot.co.uk/2017/06/constexpr-quicksort-in-c17.html

Surely D can do better?

There is nothing to do really. Just use standard library sort.

void main() {
        import std.algorithm, std.stdio;
        enum a = [ 3, 1, 2, 4, 0 ];
        static auto b = sort(a);
        writeln(b);
}

Andrei

Reply via email to