Error: template instance does not match template declaration

Vitalii yvitaliy1980 at yandex.ru
Wed Nov 17 10:10:43 UTC 2021


Hello! I am getting the following error:
```
inst.d(8): Error: template instance `Worker!(Mode.Inspect)` does 
not match template declaration `Worker(mode : Mode)
```

when compile next code:
```
enum Mode { Inspect, Execute }

class Worker(mode : Mode) {
	this() {}
}

void main() {
	auto W = Worker!(Mode.Inspect)();
}
```
Can anybody suggest to me what I do wrong?


More information about the Digitalmars-d-learn mailing list