jirzynek / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

equal_range does not work #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Great! Thanks, Craig.

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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Speedy! Thanks a lot, Craig.

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