[libcxx-commits] [PATCH] D139231: [libc++] Move the definition of aligned allocation helpers outside of <new>
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 25 13:03:27 PST 2023
ldionne added inline comments.
================
Comment at: libcxx/include/__memory/aligned_alloc.h:10
+#ifndef _LIBCPP___MEMORY_ALIGNED_ALLOC_H
+#define _LIBCPP___MEMORY_ALIGNED_ALLOC_H
+
----------------
Mordante wrote:
> Why is the header not included by `__memory`? When intended it would be good to document why it's the case.
> Then the guarded include in the `.cpp` files can be removed too.
Like we do for many other implementation-detail headers, we don't include them in the main public header unless they provide something that is part of the public. We actually have the opposite policy (to include everything, as you mention), but we do it very inconsistently, sometimes because it's literally impossible to do otherwise. Hence, I think we should shift the policy towards including only the things that are necessary for the public API.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139231/new/
https://reviews.llvm.org/D139231
More information about the libcxx-commits
mailing list