[Solved] Why did STL made a(nother) distinction between a std::array and a std::initializer_list

The question betrays some misunderstandings about what is going on here. std::array is an array object. It is an object whose storage size is the storage for its array elements. std::initializer_list is a pointer to an array (one created by the compiler). You can heap-allocate std::array for example; you cannot heap-allocate std::initializer_list. Well, you can, … Read more

[Solved] What variations of vector-like containers already widely established? Do I have to write my own? [closed]

Here are the ones I know of: Traditional a.k.a. plain a.k.a. C array vector unique_ptr with an array-type template argument array valarray dynarray static_vector (see also here) small_vector stable_vector There are also “variable-length arrays” and “arrays with runtime bounds”, which do not exist in C++; the former exists in C. See also this question and … Read more