Re: Generic method that takes in either delegate or function

2011-01-12 Thread Lutger Blijdestijn
%u wrote: > Hi, > > Is there any way to specify a parameter as "something that can be called > with parameter types A, B, C and that returns a value of type D", without > caring whether it's a delegate, a function, or an object that overloads > opCall? (This might require the use of templates, bu

Re: Generic method that takes in either delegate or function

2011-01-12 Thread Jonathan M Davis
On Wednesday 12 January 2011 00:21:54 %u wrote: > Hi, > > Is there any way to specify a parameter as "something that can be called > with parameter types A, B, C and that returns a value of type D", without > caring whether it's a delegate, a function, or an object that overloads > opCall? (This m

Re: Generic method that takes in either delegate or function

2011-01-12 Thread Stanislav Blinov
On 01/12/2011 11:21 AM, %u wrote: Hi, Is there any way to specify a parameter as "something that can be called with parameter types A, B, C and that returns a value of type D", without caring whether it's a delegate, a function, or an object that overloads opCall? (This might require the use of

Generic method that takes in either delegate or function

2011-01-12 Thread %u
Hi, Is there any way to specify a parameter as "something that can be called with parameter types A, B, C and that returns a value of type D", without caring whether it's a delegate, a function, or an object that overloads opCall? (This might require the use of templates, but I still can't figure