On Wed, Mar 21, 2018 at 05:42:34PM +, rumbu via Digitalmars-d-learn wrote:
> I tried to define a template:
>
> enum isFoo(alias T) =
> T.stringof.length >= 3 && T.stringof[0..3] == "abc";
>
> int i;
> pragma(msg, isFoo!i);
>
> Error: string slice [0 .. 3] is out of bounds
> Error:
I tried to define a template:
enum isFoo(alias T) =
T.stringof.length >= 3 && T.stringof[0..3] == "abc";
int i;
pragma(msg, isFoo!i);
Error: string slice [0 .. 3] is out of bounds
Error: template object.__equals cannot deduce function from
argument types !()(string, string), candidates