[libcxx-commits] [libcxx] [libc++] Improve aligned allocation support with picolibc. (PR #96086)
Simon Tatham via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 21 07:38:06 PDT 2024
================
@@ -16,6 +16,8 @@
#include <new>
#include <type_traits>
+#include <__memory/aligned_alloc.h> // reuse aligned allocation helper
----------------
statham-arm wrote:
On the other hand, writing a separate set of ifdefs in two places intended to do the same job is a recipe for updating one and forgetting to update the other, so they get out of sync!
What's your alternative? I accept that we can't depend on a libc++ internal header if we're not always testing libc++ (which I didn't know, thanks). Can we move the huge pile of "guess which aligned allocation API to use" ifdefs to a place where both the tests and libc++ can include it?
https://github.com/llvm/llvm-project/pull/96086
More information about the libcxx-commits
mailing list