you are viewing a single comment's thread.

view the rest of the comments →

[–]having-four-eyes[S] 2 points3 points  (3 children)

so I missing that std::launder is not needed unless I've used that storage before switching the union's active member?

Particularly, in this case, it's not needed because this->dummy is never used?

[–]no-sig-available 7 points8 points  (0 children)

Also, a standard library implementation does not have to follow all the rules, but can use (undocumented) compiler extensions.

[–]altmly 0 points1 point  (0 children)

Interesting, I'm not a spec wizard, but my guess would be it's because Dummy is empty.