assert(__ctfe) and betterC
Tim
tim.dlang at t-online.de
Wed Jan 27 21:48:45 UTC 2021
On Wednesday, 27 January 2021 at 21:27:45 UTC, Steven
Schveighoffer wrote:
> Well, that works great! What a nice... well, I have no idea why
> this works. But thank you!
>
> -Steve
As far as I understand, the function literal can't be compiled at
the definition, because attributes and parameter types may need
to be inferred at the call site. Since the only call site is
inside a mixin, it is never compiled for runtime and no checks
for betterC need to be performed.
More information about the Digitalmars-d
mailing list