What is the status on dynarrays?

std::dynarray was intended to go with c++14 at first. However, it was later decided that std::dynarray would be moved to an “Array TS” which may also include some std::array_view class. The main reason is that the committee did not agree on some points concerning heap-allocation versus stack-allocation in some cases (what if you try to … Read more

How to increase array size on-the-fly in Fortran?

Here is a Stack Overflow question with some code examples showing several ways of using Fortran allocatable arrays: How to get priorly-unkown array as the output of a function in Fortran: declaring, allocating, testing for being already being allocated, using the new move_alloc and allocation on assignment. Not shown there is explicit deallocation, since the … Read more

Why does C++ allow variable length arrays that aren’t dynamically allocated?

Support for variable length arrays (VLAs) was added to the C language in C99. It’s likely that since support for them exists in gcc (to support C99), it was relatively straightforward to add support for them to g++. That said, it’s an implementation-specific language extension, and it’s not a good idea to use implementation-specific extensions … Read more