Use decltype(sizeof(void*)) as a facsimile for std::size_t.

Clang demands that the size argument to the various operator new()'s
to be exactly whatever it thinks std::size_t is.

Since we can't include STL headers, this little trick will do.
This commit is contained in:
Andreas Kling 2018-12-02 23:48:19 +01:00
parent dd502bb54e
commit fb8a1186f6

View file

@ -11,7 +11,7 @@ typedef signed short signed_word;
typedef signed int signed_dword;
typedef signed long long int signed_qword;
typedef unsigned long size_t;
typedef decltype(sizeof(void*)) size_t;
typedef long ssize_t;
static_assert(sizeof(size_t) == sizeof(dword));