close
Skip to content

Fix bug in stable_vector::capacity() - #26

Merged
igaztanaga merged 1 commit into
boostorg:masterfrom
timsong-cpp:patch-1
Apr 19, 2015
Merged

Fix bug in stable_vector::capacity()#26
igaztanaga merged 1 commit into
boostorg:masterfrom
timsong-cpp:patch-1

Conversation

@timsong-cpp

Copy link
Copy Markdown
Contributor

See http://stackoverflow.com/q/29727368/2756719; the bit-twiddling version is not equivalent to the original return (index_size ? (index_size - ExtraPointers + extra_capacity) : index_size);; it ends up subtracting, rather than adding, extra_capacity.

See http://stackoverflow.com/q/29727368/2756719; the bit-twiddling version is not equivalent to the original `return (index_size ? (index_size - ExtraPointers + extra_capacity) : index_size);`; it ends up subtracting, rather than adding, `extra_capacity`.
@timsong-cpp

Copy link
Copy Markdown
Contributor Author

Bah, didn't notice that I wasn't on the develop branch. But since it's a one character change....

@igaztanaga
igaztanaga merged commit 6bf6c55 into boostorg:master Apr 19, 2015
@igaztanaga

Copy link
Copy Markdown
Member

Many thanks for the patch, it's surprising and embarrasing this has not fixed being before.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants