As already mentioned, there simply is no assign member to std::array.
The interesting question now becomes why ? After all, the other containers have an assign member method !
I would note that unlike other containers, std::array has a fixed size. If you use std::vector<T>::assign (which would be a close equivalent), the vector is resized appropriately to match the size of the sequence being assigned; with an array, however, that would be impossible:
- what would you do if the sequence being assigned is shorter than the array ?
- what would you do if the sequence being assigned is longer than the array ?
this would be counter-intuitive, as the question does not arise for the other containers since their size is just adapted on the fly.
For a similar reason, std::array does not have: reserve, capacity, clear, insert, emplace, erase, push/pop (and variants) or resize. All of them suppose a container which size may vary.
std::arrayhas noassignmember function?