[#BloombergLP-bdlb-NullableAllocatedValue_PointerBitsPair] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::NullableAllocatedValue_PointerBitsPair :relfileprefix: ../../ :mrdocs: This is a component‐private class. Do not use. == Synopsis Declared in `<bdlb_nullableallocatedvalue_pointerbitspair.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, unsigned int t_NUM_BITS> class NullableAllocatedValue_PointerBitsPair; ---- == Description This regular, value‐semantic class provides a mechanism for storing a number of bit flags in the otherwise unused bits of a pointer to the template parameter class `t_TYPE`. The number of bits that can be stored is dependent upon the required alignment of the class `t_TYPE`. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/2constructor-09.adoc[`NullableAllocatedValue_PointerBitsPair`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/clearFlag.adoc[`clearFlag`] | Clear the flag specified by `idx`. The behavior is undefined unless `idx < t_NUM_BITS`. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/equal.adoc[`equal`] | Return `true` if this object and the specified `other` have the same value, and `false` otherwise. Two `NullableAllocatedValue_PointerBitsPair` objects have the same value when their pointer and flags are the same. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/getPointer.adoc[`getPointer`] | Return the held pointer. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/readFlag.adoc[`readFlag`] | Return the value of the flag specified by `idx`. The behavior is undefined unless `idx < t_NUM_BITS`. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/setFlag.adoc[`setFlag`] | Set the flag specified by `idx`. The behavior is undefined unless `idx < t_NUM_BITS`. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/setPointer.adoc[`setPointer`] | Set the held pointer to the value of the specified `new_ptr`. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair/swap.adoc[`swap`] | Efficiently exchange the value of this object with the value of the specified `other` object. This method provides the no‐throw exception‐safety guarantee. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/operator_not_eq-0cc.adoc[`operator!=`] | Return `false` if the specified `lhs` and `rhs` objects have the same value, and `true` otherwise. Two `NullableAllocatedValue_PointerBitsPair` objects have the same value when their pointer and flags are the same. | xref:BloombergLP/bdlb/operator_eq-05a.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise. Two `NullableAllocatedValue_PointerBitsPair` objects have the same value when their pointer and flags are the same. | xref:BloombergLP/bdlb/swap-01.adoc[`swap`] | Exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#