Generic method that takes in either delegate or function

%u wfunction at hotmail.com
Wed Jan 12 00:21:54 PST 2011


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 it out...)

Thank you!


More information about the Digitalmars-d-learn mailing list