hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

Šimon Tóth

Preallocating capacity for elements is generally the performance-optimal approach. However, it adds code complexity, and we might not know the number of elements upfront.

Inserter adapters solve this problem by adapting the destination range and calling push_back (back_inserter), push_front (front_inserter) or insert (inserter) on each write.

Compiler Explorer link: compiler-explorer.com/z/Eb9ed4