Skip to content

add index operator [] support for const and immutable ndslices

Choose a tag to compare

@9il 9il released this 20 Aug 06:32
· 1179 commits to master since this release
struct Foo
{
    ContiguousSlice!(1, int) bar;

    int get(size_t i) immutable
    {
        return bar[i];
    }

    int get(size_t i) const
    {
        return bar[i];
    }
}