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

unordered_{map,set}: Add single-parameter createDeviceObject function #46

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

stotko
Copy link
Owner

@stotko stotko commented Dec 17, 2019

In contrast to all other containers, unordered_map and unordered_set have a 2-parameter version of createDeviceObject which is difficult to use since it requires the user to balance both "capacity" values and imposes a strict constraint to the first parameter. Add a 1-parameter version of this function (without such a constraint) that automatically estimates a suitable number of buckets and excess entries for the requested container capacity. Furthermore, add a max_load_factor function that returns the current/default maximum load factor that is taken into account for above estimation. Deprecate the old- 2-parameter function to encourage users to port/use the new version.

@stotko stotko added this to the 1.2.0 milestone Dec 17, 2019
@stotko stotko changed the title unordered_{map,set}: Add 1-parameter createDeviceObject function unordered_{map,set}: Add single-parameter createDeviceObject function Dec 17, 2019
@stotko stotko force-pushed the unordered_base_container_size branch from 37c2e18 to 5d9b23b Compare December 17, 2019 10:13
@stotko stotko merged commit 2fe5cdb into master Dec 17, 2019
@stotko stotko deleted the unordered_base_container_size branch December 17, 2019 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant