On 30/01/2015 16:53, Nick Treleaven wrote:
This version of staticArray allows the user to (optionally) specify the
element type.

Actually, I'm having trouble implementing staticArray like that, perhaps there are compiler issues causing problems. Using this:

T[len] staticArray(T, size_t len)(T[len] items)
{
    return items;
}

you would need to call it: staticArray([a, b, c]). UFCS doesn't seem to work, and I can't get the immutable or function array example to compile either (with the extra [brackets])...

Reply via email to