If I remember correctly, at some point a syntax was introduced for pattern-matching functions passed to templates. Something like:

template Foo(B(A) foo, A, B)
{
}

alias f = Foo!((int x) => x % 2 == 0);

That would instantiate Foo with B == bool, A == int and foo bound to the lambda.

The compiler has rejected all syntax variations I have tried and the specs is not helpful. Does anybody know if the feature exists and what is the syntax exactly?

Reply via email to