Generic method that takes in either delegate or function

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


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