carb::cpp20¶
Namespace for backports of C++20 features.
Detailed Description¶
Namespace for C++14 compatible versions of some C++20 STL classes and functions.
Classes¶
carb::cpp20::counting_semaphore: Counted semaphore wrapper class.
Enums¶
carb::cpp20::endian: Indicates the endianness of all scalar types for the current system.
Functions¶
carb::cpp20::bit_cast: Re-interpets the bits
src
as typeTo
.carb::cpp20::bit_ceil: Finds the smallest integral power of two not less than the given value.
carb::cpp20::bit_floor: Finds the largest integral power of two not greater than the given value.
carb::cpp20::countl_zero: Returns the number of consecutive 0 bits in the value of val, starting from the most significant bit (“left”).
carb::cpp20::countr_zero: Returns the number of consecutive 0 bits in the value of val, starting from the least significant bit (“right”).
carb::cpp20::has_single_bit: Checks if a given value is an integral power of 2.
carb::cpp20::popcount: Returns the number of 1 bits in the value of x.
Typedefs¶
carb::cpp20::binary_semaphore: Alias for a counting semaphore that can only be acquired by one caller at a time.