The C ++ 14 project includes both runtime size arrays and the std::dynarray . From what I can tell, the only real difference between the two is that std::dynarray has an STL interface (e.g. begin , end , size , etc.), while runtime size arrays don't work . So why does C ++ 14 need both of them?
I understand that runtime size arrays are part of the main language, and std::dynarray is part of the standard library, but the suggestion for std::dynarray clear that authors expect compilers to offer special support for std::dynarray in many cases, so that it can be as efficient as possible, that is, as efficient as the size of the runtime array. So the language / library distinction seems somewhat artificial.
So again, why does C ++ 14 need both runtime size arrays and std::dynarray ? And given that std::dynarray has a richer (STLified) interface, why not just drop runtime arrays, assuming std::dynarray can be implemented with equal execution efficiency?
Explanation
When I talk about "runtime size arrays", I mean the new C ++ 14 language feature described in N3639 , not traditional C-arrays or VLA or anything in C ++ 11.
c ++ c ++ 14 dynamic-arrays
KnowItAllWannabe Jun 27 '13 at 21:54 2013-06-27 21:54
source share