"temporary" templates
Stefan Koch
uplink.coder at googlemail.com
Mon Dec 2 02:26:33 UTC 2019
On Monday, 2 December 2019 at 02:02:04 UTC, Suleyman wrote:
>
> Not to this extent though. What we're potentially discussing
> here is functions which have a reusable body like a runnable
> template. For example a CTFE function `bool isSame(alias A,
> alias B) { return __traits(isSame, A, B); }` this is unlike any
> regular function that we have today.
Interesting this is exactly the syntax I wanted to use ;)
Any ctfe function that has an alias parameter is a ctfe only
function.
Using this you can give a function a default alias parameter if
you want it to be compile time only.
it's a simple rule, and not confusing at all.
More information about the Digitalmars-d
mailing list