How use Predicate (alias pred = "a*b")?

Marcone marcone at email.com
Thu May 13 21:30:43 UTC 2021


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`



More information about the Digitalmars-d-learn mailing list