boostorg / boostorg/poly_collection

Default reserve size

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
73
Forks
30
Avg merge
16h 44m
Merged PRs (30d)
1

Description

I would like to suggest adding a user-configurable default reserve size which applies to all future allocations, including types which have not been registered yet.

Motivation: As is, having to explicitly `reserve(theSameValue)` somewhat defeats the polymorphic goal of the library. In most of my use cases, I simply want to set a per-segment initial size and leave it at that.

I like having the option of performing per-segment reserves if I choose, so I think leaving `reserve` as-is is fine, and adding a `setDefaultReserve` would solve the issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.