Aliasing a mixin (or alternative ways to profile a scope)
Simon
simon.vanbernem at yahoo.de
Sun Mar 10 12:37:48 UTC 2019
On Saturday, 9 March 2019 at 09:12:13 UTC, Dennis wrote:
> On Friday, 8 March 2019 at 11:42:11 UTC, Simon wrote:
>> Thanks, this works flawlessly. Out of interest: what is the
>> "enum" doing there? I had the exact same behaviour in a
>> function before, that I only called at compile-time, so why
>> did it complain then? Can I somehow tell the compiler that a
>> function should only be available at compile-time?
>
> The enum (which in D is not only for enumerations, but also for
> "manifest constants") ensures it is evaluated at compile-time,
> since things are only evaluated at compile-time if they have to.
> See also Adam D. Ruppe's post in this thread:
> https://forum.dlang.org/post/blaawtdhljjantvgafud@forum.dlang.org
Thanks!
More information about the Digitalmars-d-learn
mailing list