It's a C++ technicality. The first case is the construction of an array, which supports that nice compact syntax. The second case is assignment to an array, which doesn't.
You can do it like this: std::vector<Face> faces(12);
Face f = {{0,1,2}};//construction
faces[0] = f;//assignmentOr like this: std::vector<Face> faces(12);
DWORD data = {0,1,2};//construction
std::copy(data, data+3, faces[0].indices);//assignment
It's a C++ technicality. The first case is the construction of an array, which supports that nice compact syntax. The second case is assignment to an array, which doesn't.
You can do it like this: std::vector<Face> faces(12);
Face f = {{0,1,2}};//construction
faces[0] = f;//assignmentOr like this: std::vector<Face> faces(12);
DWORD data = {0,1,2};//construction
std::copy(data, data+3, faces[0].indices);//assignment
Oh, interesting. So there is no way to do it in a single line? I may as well just set each component.
If you're looking for simplicity on the setting side, you could add a function (possibly even constructor) to the Face class to allow for setting the indices. Then it would give you a one liner on the side of utilizing the class.