On 12/29/14 9:18 AM, Steven Schveighoffer wrote:

Static-if applies to generic coding, i.e. templates. A template function
may work, but I don't think you even need static if:

class Hugo { ... }

void blah(T)(T obj, void function(T t) f) if(T : Hugo) { f(obj);}

um...

blah(T : Hugo)(T obj, void function(T t) f) { f(obj); }

Maybe this will work better, but still untested :) You may need T : const(Hugo).

-Steve

Reply via email to