Skip to content

UnrolledList: item inserted at wrong location after a remove #189

Description

@dhananjays
version(emsi_containers_unittest) unittest
{
    UnrolledList!int list;
    list.insert(4);
    list.insert(8);
    list.insert(12);
    list.remove(8);
    list.insert(16);

    assert(list.back == 12);   // This assert succeeds, when it should have failed
    assert(list.back == 16);   // This assert fails, when it should have succeeded
}

The bug is in Node.nextAvailableIndex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions