calculateAlignmentFromSize | Calculate a usable alignment for an object of specified size bytes in the absence of compile-time knowledge of the object's alignment requirements. Return the largest power of two that evenly divides size, up to a maximum of MAX_ALIGNMENT. It is guaranteed that an object of size bytes can be safely aligned on this return value. Depending on the machine architecture and compiler options, the returned alignment may be more than required for two reasons: ` 1. The object may be composed entirely of elements, such as 'char', which have minimal alignment restrictions. |
calculateAlignmentOffset | Return the smallest non-negative offset in bytes that, when added to the specified address, yields the specified alignment. The behavior is undefined unless 0 < alignment and alignment is a power of 2. |
is2ByteAligned | Return true if the specified address is aligned on a 2-byte boundary (i.e., the integer value of address is divisible by 2), and false otherwise. |
is4ByteAligned | Return true if the specified address is aligned on a 4-byte boundary (i.e., the integer value of address is divisible by 4), and false otherwise. |
is8ByteAligned | Return true if the specified address is aligned on an 8-byte boundary (i.e., the integer value of address is divisible by 8), and false otherwise. |
toAscii | Return the string representation of the specified enumerator value. The string representation of value matches its corresponding enumerator name with the "BSLS_" prefix elided. For example: ` bsl::cout << Alignment::toAscii(Alignment::BSLS_NATURAL); ` will print the following on standard output: ` NATURAL ` |