This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

22
cppdraft/cstddef/syn.md Normal file
View File

@@ -0,0 +1,22 @@
[cstddef.syn]
# 17 Language support library [[support]](./#support)
## 17.2 Common definitions [[support.types]](support.types#cstddef.syn)
### 17.2.1 Header <cstddef> synopsis [cstddef.syn]
// all freestandingnamespace std {using [ptrdiff_t](#lib:ptrdiff_t "17.2.1Header <cstddef> synopsis[cstddef.syn]") = *see below*; using [size_t](cstdio.syn#lib:size_t "31.13.1Header <cstdio> synopsis[cstdio.syn]") = *see below*; using [max_align_t](support.types.layout#lib:max_align_t "17.2.4Sizes, alignments, and offsets[support.types.layout]") = *see below*; using [nullptr_t](support.types.nullptr#lib:nullptr_t "17.2.3Null pointers[support.types.nullptr]") = decltype(nullptr); enum class [byte](#lib:byte "17.2.1Header <cstddef> synopsis[cstddef.syn]") : unsigned char {}; // [[support.types.byteops]](support.types.byteops "17.2.5byte type operations"), byte type operationstemplate<class IntType>constexpr byte& operator<<=(byte& b, IntType shift) noexcept; template<class IntType>constexpr byte operator<<(byte b, IntType shift) noexcept; template<class IntType>constexpr byte& operator>>=(byte& b, IntType shift) noexcept; template<class IntType>constexpr byte operator>>(byte b, IntType shift) noexcept; constexpr byte& operator|=(byte& l, byte r) noexcept; constexpr byte operator|(byte l, byte r) noexcept; constexpr byte& operator&=(byte& l, byte r) noexcept; constexpr byte operator&(byte l, byte r) noexcept; constexpr byte& operator^=(byte& l, byte r) noexcept; constexpr byte operator^(byte l, byte r) noexcept; constexpr byte operator~(byte b) noexcept; template<class IntType>constexpr IntType to_integer(byte b) noexcept;}#define [NULL](cstdio.syn#lib:NULL "31.13.1Header <cstdio> synopsis[cstdio.syn]") *see below*#define [offsetof](diff.offsetof#lib:offsetof "C.8.5.2Macro offsetof(type, member-designator)[diff.offsetof]")(P, D) *see below*
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L82)
The contents and meaning of the header <cstddef> are the same as
the C standard library header [<stddef.h>](support.c.headers.general#header:%3cstddef.h%3e "17.15.1General[support.c.headers.general]"),
except that it does not declare the type wchar_t,
that it does not define the macro unreachable,
that it also declares the type byte and its associated operations ([[support.types.byteops]](support.types.byteops "17.2.5byte type operations")),
and as noted in[[support.types.nullptr]](support.types.nullptr "17.2.3Null pointers") and[[support.types.layout]](support.types.layout "17.2.4Sizes, alignments, and offsets")[.](#1.sentence-1)
See also: ISO/IEC 9899:2024, 7.22