[Issue 8577] static assert is triggered after tuple bounds check

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 29 08:04:34 PDT 2014


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

hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx

--- Comment #1 from hsteoh at quickfur.ath.cx ---
Workarounds:

1)
-----
template T(Ts...)
    if (Ts.length > 1)
{
    alias Ts[1] Z;
}
-----

2)
-----
template T(Ts...)
{
    static if (Ts.length > 1)
        alias Ts[1] Z;
    else
        static assert(0);
}
-----

--


More information about the Digitalmars-d-bugs mailing list