[libc-commits] [libc] [libc][CPP] Define max_align_t (PR #94065)

via libc-commits libc-commits at lists.llvm.org
Fri May 31 20:41:38 PDT 2024


================
@@ -16,6 +16,10 @@ namespace LIBC_NAMESPACE::cpp {
 
 enum class byte : unsigned char {};
 
+// When built with clang, this will use the definition from the clang header
+// __stddef_max_align_t.h
+using ::max_align_t LIBC_USING_IF_EXISTS;
----------------
lntue wrote:

Can we just `#include <stddef.h> // for max_align_t` whenever we need it?  Is there any environment that does not provide `max_align_t` in `stddef.h`?

https://github.com/llvm/llvm-project/pull/94065


More information about the libc-commits mailing list