Frist Draft (in this forum): Enum Parameters
Timon Gehr
timon.gehr at gmx.ch
Mon Apr 29 16:32:42 UTC 2024
On 4/29/24 18:08, Quirin Schroll wrote:
> but if you just want to have enum parameters, the language adds the
> needed template value parameters at the end of the template parameter list
The (logistical) issue with this is that e.g., the following is disallowed:
```d
void foo(T...,int x)(){}
```
This gets back to the issue of name mangling, because I think there is
no way to distinguish an instantiation where the last template parameter
goes to `T...` and an instantiation where the last template parameter
goes to `x`.
Of course, this introduces many other issues unrelated to `enum`
parameters, e.g., I think you cannot have a (non-nested) template
accepting multiple delegate types with different but variadic parameter
lists.
So in general, some thought will have to be put into how to support IFTI.
More information about the dip.development
mailing list