class PointerEmbeddedInt
Declaration
template <typename IntT,
int Bits = sizeof(type - parameter - 0 - 0) * 8>
class PointerEmbeddedInt { /* full declaration omitted */ };
Description
Utility to embed an integer into a pointer-like type. This is specifically intended to allow embedding integers where fewer bits are required than exist in a pointer, and the integer can participate in abstractions along side other pointer-like types. For example it can be placed into a \c PointerSumType or \c PointerUnion. Note that much like pointers, an integer value of zero has special utility due to boolean conversions. For example, a non-null value can be tested for in the above abstractions without testing the particular active member. Also, the default constructed value zero initializes the integer.
Declared at: llvm/include/llvm/ADT/PointerEmbeddedInt.h:33
Templates
- IntT
- int Bits = sizeof(type-parameter-0-0) * 8
Method Overview
- public PointerEmbeddedInt<IntT, Bits>()
- public PointerEmbeddedInt<IntT, Bits>(IntT I)
- public IntT operator type-parameter-0-0() const
Methods
¶PointerEmbeddedInt<IntT, Bits>()
PointerEmbeddedInt<IntT, Bits>()
Declared at: llvm/include/llvm/ADT/PointerEmbeddedInt.h:59
¶PointerEmbeddedInt<IntT, Bits>(IntT I)
PointerEmbeddedInt<IntT, Bits>(IntT I)
Declared at: llvm/include/llvm/ADT/PointerEmbeddedInt.h:61
Parameters
- IntT I
¶IntT operator type - parameter - 0 - 0() const
IntT operator type - parameter - 0 - 0() const
Declared at: llvm/include/llvm/ADT/PointerEmbeddedInt.h:72