Skip to content

Latest commit

 

History

History
77 lines (58 loc) · 2.71 KB

cstddef.md

File metadata and controls

77 lines (58 loc) · 2.71 KB
titledescriptionms.datef1_keywordshelpviewer_keywordsms.assetid
<cstddef>
Describes <stddef.h>, which ensures that the names declared using external linkage in the C standard library header are declared in the `std` namespace.
9/4/2020
<cstddef>
cstddef header
be8d1e39-5974-41ee-b41d-eafa6c82ffce

<cstddef>

Includes the C standard library header <stddef.h> and adds associated names to the std namespace. Including this header ensures that the names declared using external linkage in the C standard library header are declared in the std namespace.

Note

<cstddef> includes type byte and doesn't include type wchar_t.

Syntax

#include<cstddef>

Namespace and Macros

namespacestd { usingptrdiff_t = see definition; usingsize_t = see definition; usingmax_align_t = see definition; usingnullptr_t = decltype(nullptr); } #defineNULL// an implementation-defined null pointer constant #defineoffsetof(type, member-designator)

Parameters

ptrdiff_t
An implementation-defined signed integer type that can hold the difference of two subscripts in an array object.

size_t
An implementation-defined unsigned integer type that is large enough to contain the size in bytes of any object.

max_align_t
A POD type whose alignment requirement is at least as great as that of every scalar type, and whose alignment requirement is supported in every context.

nullptr_t
A synonym for the type of a nullptr expression. Although a nullptr address can't be taken, the address of another nullptr_t object that is an lvalue can be taken.

byte Class

enumclassbyte : unsignedchar {}; template <classIntType> constexpr byte& operator<<=(byte& b, IntType shift) noexcept; constexpr byte operator<<(byte b, IntType shift) noexcept; constexpr byte& operator>>=(byte& b, IntType shift) noexcept; constexpr byte operator>>(byte b, IntType shift) noexcept; constexpr byte& operator|=(byte& left, byte right) noexcept; constexpr byte operator|(byte left, byte right) noexcept; constexpr byte& operator&=(byte& left, byte right) noexcept; constexpr byte operator&(byte left, byte right) noexcept; constexpr byte& operator^=(byte& left, byte right) noexcept; constexpr byte operator^(byte left, byte right) noexcept; constexpr byte operator~(byte b) noexcept; template <classIntType> IntType to_integer(byte b) noexcept;

See also

Header Files Reference
C++ Standard Library Overview
Thread Safety in the C++ Standard Library

close