Ambiguity issue with expanding and evaluating single template type parameter enums
data pulverizer
data.pulverizer at gmail.com
Mon Dec 27 21:21:30 UTC 2021
On Monday, 27 December 2021 at 21:05:51 UTC, data pulverizer
wrote:
> Hello, ...
>
... an equivalent mixin error would be
```
//...
alias DOUBLE = MyEnum.DOUBLE;
alias STRING = MyEnum.STRING;
alias INTEGER = MyEnum.INTEGER;
void main()
{
alias T = MyType!(INTEGER);
alias U = MyType!(STRING);
enum code = "writeln(\"instance: \", adder(" ~
T.stringof ~ "(), " ~ U.stringof ~ "()" ~ "));";
mixin(code);
}
```
More information about the Digitalmars-d-learn
mailing list