Search code examples
c++c++23

Does the std library contain equivalent to boost small_vector and static_vector?


Those 2 containers are useful. Allocated on the stack up to some size, then on the heap. And the other, max compile time capacity with a runtime number of elements.

Is there a equivalent in the std library? Are there proposals for future versions of the std library?


Solution

  • Is there a equivalent in the std library?

    Not as of this writing.

    Are there proposals for future versions of the std library?

    For static_vector: P0843.

    For small_vector: P0274.