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

equal_range does not work #38

Closed
GoogleCodeExporter opened this issue Apr 11, 2015 · 4 comments
Closed

equal_range does not work #38

GoogleCodeExporter opened this issue Apr 11, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

equal_range currently returns
pair(pos, pos)
whereas it should return
pair(pos, pos+1)
or
pair(end, end)
if the element was not found.
Since the range returned is open on one side [first, last), [pos, pos) is
the empty set.

Thanks,
Shaun

Original issue reported on code.google.com by sjackman on 8 May 2009 at 5:38

@GoogleCodeExporter
Copy link
Author

Crikey!  You're absolutely right.  This has been a bug in sparsehash for 
forever; I
guess not many folks use equal_range since these aren't multi-maps.  Still, 
seems
like a pretty bad bug to have in there.  I'll see about pushing a new release 
this
weekend.

Original comment by csilv...@gmail.com on 8 May 2009 at 8:28

  • Changed state: Accepted
  • Added labels: Priority-High, Type-Defect

@GoogleCodeExporter
Copy link
Author

Great! Thanks, Craig.

Original comment by sjackman on 8 May 2009 at 10:11

@GoogleCodeExporter
Copy link
Author

I've just released sparsehash 1.5.1 to fix this bug.

Original comment by csilv...@gmail.com on 9 May 2009 at 4:16

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Speedy! Thanks a lot, Craig.

Original comment by sjackman on 9 May 2009 at 4:31

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

No branches or pull requests

1 participant