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

Update CircularBuffer erase(iter) to return the entry after the one that is replaced #236

Open
benoy-sifive opened this issue Apr 12, 2021 · 1 comment
Assignees
Labels
bug Something isn't working component: sparta Issue is related to sparta framework enhancement Enhancement or request

Comments

@benoy-sifive
Copy link
Contributor

No description provided.

@ghost ghost self-assigned this Apr 13, 2021
@ghost ghost added bug Something isn't working component: sparta Issue is related to sparta framework enhancement Enhancement or request labels Apr 13, 2021
@ghost
Copy link

ghost commented Apr 13, 2021

Ugh... I thought this would be a quick fix. CB is totally broken with respect to iterators. You can't even do this:

  auto next_it = circ_buf.begin();
  ++next_it;
  circ_buf.erase(circ_buf.begin());
  assert(next_it.isValid()); // WILL INCORRECTLY ASSERT!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: sparta Issue is related to sparta framework enhancement Enhancement or request
Projects
None yet
Development

No branches or pull requests

2 participants