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 templates, but I still can't figure it out...) Thank you!
See in std.traits: isSomeFunction isCallable ReturnType ParameterTypeTuple You can use those in template constraints/static assert conditions.