What is the status on dynarrays?

狂风中的少年 提交于 2019-11-28 11:28:46

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 allocate an std::dynarray with new). Therefore, it was decided that it would be delayed. There are still some ongoing discussions about what should be done.

The class won't be ready for C++14. It will probably come with the Arrays TS or C++17.

Update: std::dynarray wasn't in C++14, won't be in C++17, the Arrays TS has been discontinued, so there probably won't be anything close to std::dynarray in the standard before long. If I understand the current position of the standard correctly, rather than magical runtime-sized arrays, the committee would rather come up with a general solution for runtime-sized classes, but every suggestion so far has been rejected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!