Skip to content

slightly less undefined behavior in Vector3D and Vector4D implementation#6

Open
axelfeldmann wants to merge 1 commit intocmu462:masterfrom
axelfeldmann:vec-ub-fix
Open

slightly less undefined behavior in Vector3D and Vector4D implementation#6
axelfeldmann wants to merge 1 commit intocmu462:masterfrom
axelfeldmann:vec-ub-fix

Conversation

@axelfeldmann
Copy link
Copy Markdown

Vector3D and Vector4D depend on undefined (and brittle) behavior in their indexing overloads. This PR is still technically undefined behavior according to the C++ standard, but this form of type punning is defined and supported by all major C++ compilers (I know for a fact about gcc, clang, and mscv).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant