Frist Draft (in this forum): Enum Parameters
Timon Gehr
timon.gehr at gmx.ch
Mon Apr 29 21:59:38 UTC 2024
On 4/29/24 18:32, Timon Gehr wrote:
> 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`.
Sorry, my bad. This point did not fully make sense, because `x` is not
optional in this example. The problem with ambiguity only occurs if you
have multiple variadic parameters (which are also disallowed, but you do
not need them in your proposal).
It is still true that D currently disallows adding any template
parameters after the variadic parameter though.
More information about the dip.development
mailing list