C++ already gives us a tool for pointer zapping
C++ already gives us a tool for pointer zapping
Posted Oct 16, 2024 18:04 UTC (Wed) by PaulMcKenney (✭ supporter ✭, #9624)In reply to: C++ already gives us a tool for pointer zapping by NYKevin
Parent article: Zapping pointers out of thin air
The C++ committee did look into use of std::launder, but it does not handle all the cases. For but one example, the pointed-to object might be freed just after the std::launder operation completed, thus zapping the just-now-laundered pointer.