boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

Provide a way to specify `deque` block size per container #278

Closed Lastique closed 1 month ago

Lastique commented 1 month ago

deque_block_size allows to customize the allocation block size for a given value type. But this affects any deque with this value type, and this may not be desired.

It would be useful to have a template parameter in the deque template to be able to specify the block size (in the number of container elements) to be used for that container.

Lastique commented 1 month ago

Turns out, there already is an option for deque to specify block size.

https://www.boost.org/doc/libs/master/doc/html/container/configurable_containers.html#container.configurable_containers.configurable_deques

igaztanaga commented 1 month ago

The option is already there, it's called "block_size", but it wasn't properly documented in the reference. Fixed here:

https://github.com/boostorg/container/commit/8d179787482f389d9dc564273e81b651b4a4f088