function is not function

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Sep 21 13:40:29 PDT 2012


On 09/21/2012 01:10 PM, Ali Çehreli wrote:
>
> You have probably tried the following already:
>
>      pragma(msg, is(typeof(a) == void function()));
>

No, but that's also not very generic.

void main() {
     auto a = {
         return 1;
     };
     pragma(msg, is(typeof(a) == void function())); // nope!
     pragma(msg, typeof(a)); // void function() pure nothrow @safe
}

guess what I'm fighting with just now


More information about the Digitalmars-d-learn mailing list