logoalt Hacker News

Joker_vDtoday at 12:33 PM1 replyview on HN

> a similar type, but whose size and capacity are fixed on construction and never change.

There is std::array for that. Also, for a type with fixed capacity but variable (up to that capacity) size, we're getting std::inplace_vector soon™.


Replies

einpoklumtoday at 1:11 PM

std::array requires the size to be set at compile-time, while I was talking about arrays whose size is determined at construction-time. Of course std::array is also quite the useful class :-)