[libcxx-commits] [libcxx] [libc++] Mark std::unique_ptr::release() as nodiscard (PR #110847)
David Benjamin via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 7 00:31:32 PDT 2024
davidben wrote:
In the BoringSSL case, it is indeed a custom deleter. I suspect that's a decent heuristic for the C API boundary case, though there's definitely also other scenarios going on like weird "self-deleting" objects. (Which I would argue is actually badly modelled ownership transfer but nonetheless is a thing.)
Still the custom deleter heuristic might help a bit. (Like I said, I'm also quite open to finding a better pattern for the BoringSSL stuff.)
https://github.com/llvm/llvm-project/pull/110847
More information about the libcxx-commits
mailing list