Cleanest way to copy a constant size array in c++11

If you use std::array instead of a built-in array (which you should), it becomes very simple. Copying an array is then the same as copying any other object.

std::array<float,4> a = {0,1,2,3};
std::array<float,4> b = a;

Leave a Comment