Details
Description
Quoting https://codereview.qt-project.org/c/qt/qtbase/+/497361/comment/08c2108e_11340ef4/ :
Either d or typeAndFlags are the active member. We read d and isSlowPath() reads typeAndFlags. So a compiler can legitimately conclude that lhs.d must always be == rhs.d because reading typeAndFlags after asserting (by reading it) that d is the active member would be UB and cannot happen.
While the above is about operator== specifically, I expect much of the class to have the same issue.
Acceptance criteria:
- the union d/typeAndFlags is gone and replaced by a non-variant member and manual bit-fiddling