[libcxx-commits] [libcxx] [libc++] Remove <stddef.h> includes from the granularized <cstddef> headers (PR #114788)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 5 06:24:58 PST 2024
================
@@ -10,15 +10,14 @@
#define _LIBCPP___CSTDDEF_SIZE_T_H
#include <__config>
-#include <stddef.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-using ::size_t _LIBCPP_USING_IF_EXISTS;
+using size_t = __SIZE_TYPE__;
----------------
ldionne wrote:
How about this instead, which decouples us from the compiler?
```suggestion
using size_t = decltype(sizeof(int));
```
https://github.com/llvm/llvm-project/pull/114788
More information about the libcxx-commits
mailing list