import std; template foo(alias pred = "a*b"){ void foo(int x, int y){ writeln(x.unaryFun!pred); } }
void main(){ foo(5, 4); } "a" works, but "b" not work. I get this error: Error: undefined identifier `b`
Marcone via Digitalmars-d-learn Thu, 13 May 2021 14:35:53 -0700
import std; template foo(alias pred = "a*b"){ void foo(int x, int y){ writeln(x.unaryFun!pred); } }
void main(){ foo(5, 4); } "a" works, but "b" not work. I get this error: Error: undefined identifier `b`