On 23.01.15 19:05, zeljkog wrote: > On 23.01.15 18:48, H. S. Teoh via Digitalmars-d wrote: >> >> I think what he's trying to do is to call a function that returns a >> delegate, and use that delegate to instantiate the filter template. >> AFAIK I've never seen code like this before, and it looks like the >> compiler isn't prepared to handle this. >> > > Yes, I tried to use filter for unique, need closure. > I think there are many applications for this pattern. >
It comes down to a question: Why structs with opCall are not supported as template parameters in std.algorithm together with functions? Like this: filter!SomeStructWithOpCall It is simple addition. Or is it with reason?
