From 7023c0cc9a7c6d2085f018d5524df6a726d6e487 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Tue, 18 Mar 2025 23:42:30 +0100 Subject: Use launder to access buffer SSO storage --- asl/containers/buffer.hpp | 2 +- todo.txt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/asl/containers/buffer.hpp b/asl/containers/buffer.hpp index f5ba975..f684808 100644 --- a/asl/containers/buffer.hpp +++ b/asl/containers/buffer.hpp @@ -403,7 +403,7 @@ public: return buffer.is_on_heap() ? return_type{ buffer.m_data } // NOLINTNEXTLINE(*-reinterpret-cast) - : reinterpret_cast(&buffer); + : std::launder(reinterpret_cast(&buffer)); } } diff --git a/todo.txt b/todo.txt index 2dfd0c1..8b13789 100644 --- a/todo.txt +++ b/todo.txt @@ -1,3 +1 @@ -review unions -review reinterpret_cast -review as_bytes & static_cast in general + -- cgit