[Issue 11012] [TDPL] is(typeof(f) == function) fails with some functions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jun 23 03:20:17 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=11012

Alexander <ismailsiege at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #4 from Alexander <ismailsiege at gmail.com> ---
Ok, I'll agree with Maxim, it's probably as it should be.

template isFunctionPointerType(T: FT*, FT)
{
    enum isFunctionPointerType = is(FT == function);
}

unittest
{
    auto p = (){};
    static assert(isFunctionPointerType!(typeof(p)));
}

--


More information about the Digitalmars-d-bugs mailing list