Saeed Amrollahi said:
I can't find any good reason to not replace core language array with
std::array. Actually standard array is exactly the core array without
its problems
Actually there is one reason why C static arrays cannot just be outright
replaced with std::array (although, granted, it's the only reason I can
think of at the moment). There are many situations where it would be
highly inconvenient to not to be able to do this:
const char* const names[] = // or whatever type, that's irrelevant here
{
"some name",
"another name",
"yet another name"
};
(The size of that array can be resolved, of course, with the good old
C trick "sizeof(names) / sizeof(names[0])". This can be calculated into
a compile-time constant variable if so needed.)
This is especially true the larger the array is, and the more frequently
it's changed (which may happen quite a lot during the development of the
program).
(Yes, I use this trick *a lot* in my current programming job, and it's
very useful, so it's not like it's a rare niche feature.)