r/cpp • u/igaztanaga • Apr 28 '26
boost::container::hub ACCEPTED into Boost
Hi to all, I'm glad to announce that the proposed boost::container::hub container has been ACCEPTED. Congrats u/joaquintides !
More details here:
https://lists.boost.org/archives/list/boost@lists.boost.org/thread/7WZ7QTPE2YDYD5OYCKXKKV2N74JHJRZL/
Reminder:
hub is a sequence container with O(1) insertion and erasure and element stability with great performance (see these benchmarks): pointers/iterators to an element remain valid as long as the element is not erased. hub is very similar but not entirely equivalent to C++26 std::hive (hence the different naming, consult the section "Comparison with std::hive" for details).
View all comments
Show parent comment
2
u/joaquintides Boost author Apr 29 '26
In practical terms,
boost::container::hubis almost conformant with the spec forstd::hive(differences here), so any use case suitable for the latter is suitable also for the former.