General Utility Library for C++14  2.11
Standard Library Backports

The General Utility Library provides a few classes from the C++ standard library that are not yet available to users of older compilers.

endian: An enum to determine the endianness of multi-byte scalars on the current platform, behaving like std::endian from C++20.

expected: A class template that can either contain a value of a certain (expected) type or an error value. It should behave like std::expected from C++23 for almost all use cases.

in_place_t etc.: A small family of types and tags that can be used in the constuctors of expected, optional, and variant to request in-place construction. See std::in_place for documentation on the corresponding C++17 entities.

optional: A class template that can either contain a value of a certain type or not. It should behave like std::optional from C++17 for almost all use cases.

remove_cvref: A metafunction to remove const, volatile, and reference qualifiers from a type. This is a backport of std::remove_cvref from C++20.

span: A view to a contiguous sequence of objects. It should behave like std::span from C++20 for almost all use cases.

string_view: A view to a contiguous sequence of chars. It should behave like std::string_view from C++17 for almost all use cases.

variant: Sometimes called a "type-safe union", a variant can hold a value of one of a specified set of types. Unlike a union, it can be queried for the type it is currently holding and ensures that only the stored type is accessed. The implementation should behave like std::variant from C++17.

void_t: A template typedef that maps an arbitrary list of types to void. This is primarily useful to detect ill-formed types for SFINAE. This is a backport of std::void_t from C++17.