Skip to content

Commit 0eb0aed

Browse files
committed
[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.
1 parent 338d426 commit 0eb0aed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/swift/Basic/Compiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
#if defined(__cplusplus)
201201
#if defined(__cpp_char8_t)
202202
inline constexpr char operator""_swift_u8(char8_t c) { return c; }
203-
inline const char *operator""_swift_u8(const char8_t *p, std::size_t) {
203+
inline const char *operator""_swift_u8(const char8_t *p, size_t) {
204204
return reinterpret_cast<const char *>(p);
205205
}
206206
#define SWIFT_UTF8(literal) u8##literal##_swift_u8

include/swift/RemoteInspection/MetadataSource.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ using llvm::cast;
2929

3030
#include <cerrno>
3131
#include <climits>
32+
#include <cstdlib>
3233
#include <string>
3334

3435
namespace swift {

0 commit comments

Comments
 (0)