Checking if a function exists

Michiel nomail at please.com
Wed Feb 21 13:28:18 PST 2007


Max Samukha wrote:

>> static if ( functionExists(char[] T.toString()) ) { ... }
> 
> The way that I can think of is
> 
> static if (is(typeof(&T.toString) == char[] function()))

Thanks! That part works great. The only thing missing now is the
toString(T) part.

-- 
Michiel



More information about the Digitalmars-d mailing list