P2414R8 — Pointer lifetime-end zap proposed solutions
LEWGLWG
**Introduction** **3** **Terminology** **4** **What We Are Asking For** **5** **Detailed Proposal** **6** A make_usable_ptr() Function 6 A usable_ptr<T> Template Class 6 Atomic Operations Forgive Pointer Invalidity 6 Volatile Accesses Forgive Pointer Invalidity 7 **Examples** **8** LIFO Push With Direct Pointer Access 8 Use Case 1: Invalid Pointer Use 8 Use Case 2: Zombie Pointer Dereference 9 Fixing LIFO Push Using This Proposal 9 LIFO Push With Angelic Non-Determinism 11 Use Case 1: Invalid Pointer Use 11 Use Case 2: Zombie Pointer Dereference 12 Fixing LIFO Push Using This Proposal 12 User Tracking of Pointers and realloc() 13 **Wording** **15** Add usable_ptr<T>, comparisons, make_usable_ptr(), and hash specialization 15 Atomic Operations And Prospective Pointers 17 # [atomics.types.pointer] 17 atomic_ref and Prospective Pointers 17 # [atomics.ref.pointer] 17 Volatile Operations And Prospective Pointers 17 # [conv.lval] 17 # [expr.ass] 18 **History** **19** **Appendix: Relationship to WG14 N2676** **22** **Appendix: Relation to WG21 P2434R4** **22**