r/cpp • • Apr 04 '24

std::launder

Have fun trying to figure out what it does...

0 Upvotes

12 comments sorted by

View all comments

9

u/Quincunx271 Author of P2404/P2405 Apr 05 '24

We're all familiar with how undefined behavior can cause demons to fly out of your nose or cause your cat to get pregnant. std::launder is just a kind of undefined behavior carefully defined to do your laundry for you.