Casting a Struct to an Array [duplicate]
问题 This question already has answers here : Does accessing the first field of a struct via a C cast violate strict aliasing? (1 answer) Reinterpret struct with members of the same type as an array in a standard compliant way [duplicate] (5 answers) Closed 2 years ago . This is an strict aliasing question, as in will the compiler cause any optimization order problems with this. Say that I have three public float s in a struct XMFLOAT3 (not unlike this one.) And I want to cast to a float* . Will