Unable to test for function name

Stewart Gordon smjg_1998 at yahoo.com
Thu Dec 6 16:47:50 PST 2007


"Matti Niemenmaa" <see_signature at for.real.address> wrote in message 
news:fipf8u$2ro$1 at digitalmars.com...
> Stewart Gordon wrote:
>>> Under D2.007, the static assert would pass, because f exists.
>>
>> Because f exits?  How did you come to that conclusion?  I thought the
>> halting problem was unsolvable.
>
> Exists, not exits.

Oops.

<snip>
>>> More importantly, how do I test that a function exists in D2.008?
>>
>> static assert(is(typeof(f) == function));
>
> static assert (is(typeof(f)); should suffice.

That depends on whether it should be allowed that f exists but isn't a 
function.

Stewart.

-- 
My e-mail address is valid but not my primary mailbox.  Please keep replies 
on the 'group where everybody may benefit. 




More information about the Digitalmars-d mailing list