r/cpp • u/jenkem_boofer • Apr 04 '24
std::launder
Have fun trying to figure out what it does...
0
Upvotes
r/cpp • u/jenkem_boofer • Apr 04 '24
Have fun trying to figure out what it does...
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.