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

Seb <greensunn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunn...@gmail.com

--- Comment #11 from Seb <greensunn...@gmail.com> ---
FWIW this works with static foreach


---
void main ()
{
    sformat(0, uint.max);
}

void sformat (Args...) (int index, Args args)
{
JT: switch (index)
    {
        static foreach (idx, unused; args)
        {
        case idx:
            assert(unused == args[idx], "Borken compiler");
            break JT;
        }

    default:
        assert(0);
    }
}
---

https://run.dlang.io/is/eJvNFB

--

Reply via email to