[Issue 15027] cannot pass arguments of type DirEntry to std.file functions
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 4 23:26:10 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15027
--- Comment #6 from Rainer Schuetze <r.sagitario at gmx.de> ---
> Leaving us with rewriting isDir(de) to isDir(de.name).
> That seems to be the most practical solution.
While feasible in the case of dirEntry (though breaking existing code), it will
not help in the more general case, i.e. you cannot call a template function if
the alias this type matches the constraints, but the struct type does not.
Maybe template argument type deduction should just try the aliased type if the
struct type itself fails. Doesn't this fit with other rules regarding "alias
this"?
--
More information about the Digitalmars-d-bugs
mailing list