[C++20] Two very minor C++20 fixes.

- Remove `std::` from `std::size_t` where we're importing `stddef.h`
  instead of `cstddef`.
- Add an inclusion of `<cstdlib>` where needed because libc++ has
  cleaned up some of their transitive inclusions.
This commit is contained in:
Tony Allevato
2023-12-08 09:13:39 -05:00
parent 338d426b3d
commit 0eb0aed6be
2 changed files with 2 additions and 1 deletions

View File

@@ -200,7 +200,7 @@
#if defined(__cplusplus)
#if defined(__cpp_char8_t)
inline constexpr char operator""_swift_u8(char8_t c) { return c; }
inline const char *operator""_swift_u8(const char8_t *p, std::size_t) {
inline const char *operator""_swift_u8(const char8_t *p, size_t) {
return reinterpret_cast<const char *>(p);
}
#define SWIFT_UTF8(literal) u8##literal##_swift_u8