Re: Troubles with template constraints on string and static if

2018-04-26 Thread Alex via Digitalmars-d-learn
On Thursday, 26 April 2018 at 15:06:49 UTC, sungal wrote: I have this piece of code and I can't understand why the `static if` conditionals are always false. ``` import std.digest.sha; import std.file; import std.stdio; void main() { auto hash1 = produceHash!string("prova.d"); auto has

Troubles with template constraints on string and static if

2018-04-26 Thread sungal via Digitalmars-d-learn
I have this piece of code and I can't understand why the `static if` conditionals are always false. ``` import std.digest.sha; import std.file; import std.stdio; void main() { auto hash1 = produceHash!string("prova.d"); auto hash2 = produceHash!File(File("./prova.d")); } string produce