"function ... is not callable using argument types"

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 1 04:57:13 PST 2015


> 		
> So it's look like that it can accept strings and ints without 
> problem.
>
> And I really can't understand why it's accept only "static 
> const string" constructions...
> 		

int does not implicitly convert to short. It does in the 
hardcoded version, because the compiler can prove that the value 
is between short.min and short.max.

Use to!short() to convert it to short.


More information about the Digitalmars-d-learn mailing list