65816-llvm-mos/runtime/include/c++/cstddef
Scott Duensing da095402ec Updated
2026-06-02 23:17:57 -05:00

28 lines
759 B
Text

// <cstddef> — C++ shim over the W65816 runtime's <stddef.h>.
//
// Pulls in the runtime's <stddef.h> and re-exports size_t / ptrdiff_t
// inside namespace std::. NULL / offsetof stay as macros (per the C
// standard) and remain visible at global scope.
//
// std::nullptr_t is provided directly (it's a core-language type since
// C++11 — not something that lives in <stddef.h>).
#ifndef _W65816_CXX_CSTDDEF
#define _W65816_CXX_CSTDDEF
#include <stddef.h>
namespace std {
using ::size_t;
using ::ptrdiff_t;
using nullptr_t = decltype(nullptr);
// std::byte (C++17). Defined as an enum class with explicit
// underlying type so the size is exactly one byte.
enum class byte : unsigned char {};
} // namespace std
#endif // _W65816_CXX_CSTDDEF