Unable to test for function name
Matti Niemenmaa
see_signature at for.real.address
Fri Nov 30 08:54:51 PST 2007
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.
>> In D2.008, the static assert fails. Why?
> Because a bug has been fixed. To evaluate to true, IsExpression
> requires that its operand is a semantically valid _type_.
>
>> 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.
--
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
More information about the Digitalmars-d
mailing list