Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnrolledList range value type #52

Closed
burner opened this issue May 10, 2016 · 0 comments
Closed

UnrolledList range value type #52

burner opened this issue May 10, 2016 · 0 comments
Assignees
Milestone

Comments

@burner
Copy link
Contributor

burner commented May 10, 2016

unittest
{
    UnrolledList!int list;
    list.insert(0);
    list.insert(0);
    list.insert(0);
    list.insert(0);
    list.insert(0);

    foreach(ref it; list.range) {
        it = 1;
    }

    foreach(it; list.range) {
        assert(it == 1);
    }
}

I think UnrolledList!int.Range.front needs to return ref int . But ref is sort of f*** up so I can't simple cast to ref int. @Hackerpilot ideas?

p.s. This only affects value types.
p.s.s HashMap is also affected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants