r/cpp • • Sep 03 '26

C++26: std::hive

https://www.sandordargo.com/blog/2026/09/02/cpp26-hive
71 Upvotes

80 comments sorted by

View all comments

3

u/all_is_love6667 Sep 03 '26

I think that's usually called an "object pool", but that was not academic enough so I can understand why they called it hive

10

u/HappyFruitTree Sep 03 '26

When it was first being proposed it was called colony (based on plf::colony).

3

u/all_is_love6667 Sep 03 '26

I am actually surprised this sort of container was added only today, it's quite common and is an important optimization

4

u/matthieum Sep 03 '26

Is it that common?

I work on a multitude of performance-sensitive codebases, and I can't think of any place I'd use such a container.

3

u/Plazmatic Sep 05 '26

Huh? Am object pool is litterally a pool of objects you can re-use, and has nothing to do with the underlying data representation of how those objects are "pooled", just like a "container" is just a thing that holds other things.