C++17 cannot beat D surely
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 3 11:45:56 PDT 2017
On 2017-06-03 20:31, Russel Winder via Digitalmars-d wrote:
> But is this sort guaranteed to happen at compile time rather than
> runtime?
Yes. It's the context that decides if it occurs at compile time or at
runtime.
Something declared as "static" or "enum" requires that the value can be
evaluated at compile time. That's the beauty of D, the same functions
can be used both at compile time and at runtime.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list