```model.d
module model; // model.d
import std.file : read; // this line provokes the error
int read (string filename)
{
import std.file;
auto data = std.file.read (filename);
return 0;
}
```
```main.d
module main; // main.d
import std.traits;
import model;
void main ()
{
alias Q = Parameters!(read);
}
```
$ dmd -i main
main.d(7): Error: template instance `model.Parameters!(read)` does not match template declaration `Parameters(func...)`
with `func = (read)`
must satisfy the following constraint:
` isCallable!func`
As explained in [1] the template parameter is bound to std.file.read instead of module.read.
[1] http://forum.dlang.org/thread/[email protected]
template instance does not match template declaration
Comment #1 by robert.schadek — 2024-12-13T19:21:13Z