[Issue 20863] Pass into template by alias drops qualifier

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 25 20:06:33 UTC 2020


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

moonlightsentinel at disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel at disroot.o
                   |                            |rg

--- Comment #1 from moonlightsentinel at disroot.org ---
Even smaller:

template staticFind(alias T, TList)
{
    enum bool staticFind = is(T == TList); // true;
}

static assert(staticFind!(Object, Object)); // pass
static assert(staticFind!(immutable Object, immutable Object)); // fail

--


More information about the Digitalmars-d-bugs mailing list