carb/cpp20/Bit.h¶
↰ Parent directory: carb/cpp20/
Implementation of select functions from C++20 <bit>
library.
Source: carb/cpp20/Bit.h
Included By¶
carb/math/Util.h: Carbonite math utility functions.
carb/container/IntrusiveUnorderedMultimap.h: Carbonite intrusive unordered multi-map container.
carb/container/RobinHoodImpl.h: Carbonite Robin-hood container generic implementation.
carb/extras/Uuid.h: UUIDv4 utilities.
Namespaces¶
carb: The main Carbonite namespace.
carb::cpp20: Namespace for backports of C++20 features.
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.