cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
<cstddef>

Features related to Standard header <cstddef>.

Interfaces

Features included in this section and mapped to global nsmespace or std:::

Non-backport features (cxxomfort::fix):

Other features:

Implementation Macros

std::byte conversions

C++17's byte can not be directly initialized with integral values in C++14 or previous due to the requirements on conversions to enum class types. The cxxomfort library exposes the following names under cxxomfort::fix in order to work with variables of type std::byte :

byte b = cxxomfort::fix::to_byte('c'); // creates byte from uchar
unsigned d = cxxomfort::fix::to_value(b); // converts to uchar
See also
"Implementation Fixes"

LWG2251 "ssize_t"

POSIX systems expose the ssize_t type which is essentially a signed version of size_t . This type is exposed by cxxomfort when available, otherwise it's calculated from already existing types as basically make_signed<size_t>::type.

See also
WG21 index lwg2251 for the formal definition of ssize_t .

The macro CXXOMFORT_IMPLEMENTS_ssize_t informs how this fetaure is provided:

See Also