Why function template 'among' is of complexity O(1) and not O(n)?
Jakob Ovrum
jakobovrum at gmail.com
Thu Feb 20 09:08:05 PST 2014
On Thursday, 20 February 2014 at 13:40:38 UTC, anonymous wrote:
> When the value is not needed at compile time, the optimizer may
> go for it, but that's not guaranteed.
That's not really true. The optimizer will never try CTFE because
of the halting problem. Runtime is runtime, compile-time is
compile-time - they are clearly separated by the context of the
expression alone.
More information about the Digitalmars-d-learn
mailing list