Yet another terrible compile time argument proposal

Timon Gehr timon.gehr at gmx.ch
Sun Jan 14 22:28:27 UTC 2024


On 1/14/24 23:15, Timon Gehr wrote:
> ```d
> void foo(int x)(enum int:x, int y){ }
> 
> void main(){
>      foo(1,2); // calls foo!1(2)
>      foo(2,3); // calls foo!2(3)
> }
> ```

Also, this does not clarify my intention well. Here if you have:

```d
alias foo1=foo!1;
```

and you call it like:

```d
foo1(x,y)
```
Then `x` is evaluated at compile time and there is a check if it is 
indeed `1`.


More information about the Digitalmars-d mailing list