C++17 cannot beat D surely

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 3 11:31:37 PDT 2017


On Sat, 2017-06-03 at 13:32 -0400, Andrei Alexandrescu via Digitalmars-
d wrote:
> […]
> 
> 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);
> }
> 

But is this sort guaranteed to happen at compile time rather than
runtime?

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170603/bb466dee/attachment.sig>


More information about the Digitalmars-d mailing list