I am creating a class that has a union for its matrix data, however I can only get it when I don't have a name for struct \ union. However, with a higher warning level (four at visual studio), I will warn by saying
warning C4201: nonstandard extension used : nameless struct/union
I looked into it, and it seems I can’t find a way to prevent this. In any case, I know that this will lead to another compiler error related to the declaration of one or the other. How can I prevent this warning from being received and bring it into conformity with the standards without disabling this warning.
union
{
struct
{
F32 _11, _12, _13, _14;
F32 _21, _22, _23, _24;
F32 _31, _32, _33, _34;
F32 _41, _42, _43, _44;
};
F32 _m[16];
};
(Yes, I know that there are matrix libraries available. Please do not include this in the "use xxx library" drive, I am doing this to expand my knowledge of C ++. ")