diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-03-18 23:42:30 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-03-18 23:42:30 +0100 |
commit | 7023c0cc9a7c6d2085f018d5524df6a726d6e487 (patch) | |
tree | 5825bcaa0ec2edb0e853d7eba583604d0e4771c6 | |
parent | 4884b594330dea41d04d776d14a5cb18d9a354bc (diff) |
Use launder to access buffer SSO storage
-rw-r--r-- | asl/containers/buffer.hpp | 2 | ||||
-rw-r--r-- | 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<return_type>(&buffer); + : std::launder(reinterpret_cast<return_type>(&buffer)); } } @@ -1,3 +1 @@ -review unions -review reinterpret_cast -review as_bytes & static_cast in general + |