On Friday, 5 April 2019 at 14:47:42 UTC, Sjoerd Nijboer wrote:
So the following code doesn't compile for some reason, and I can't figure out why.

The error: Error: template instance `MyClass!(MyEnum)` does not match template declaration `MyClass(MyEnum myEnum)`
pops up, no matter what I do.
I'm quite puzzled actually

You are just having a little issue with operator precedence there. Your code attempts to get the member `A` from `MyClass!MyEnum`, if you add braces around it, it'll work just fine `MyClass!(MyEnum.A)`.

Reply via email to