[#BloombergLP-bdlb-BitMaskUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BitMaskUtil :relfileprefix: ../../ :mrdocs: Namespace for functions that produce 32‐ and 64‐bit bit masks. == Synopsis Declared in `<bdlb_bitmaskutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BitMaskUtil; ---- == Description This utility `struct` provides a namespace for a set of bit‐level, stateless functions that take one or two `int` arguments and return masks of the built‐in 32‐ and 64‐bit integer types `uint32_t` and `uint64_t`, respectively. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/BitMaskUtil/_04enum.adoc[`Unnamed enum`] | Number of bits in type `uint32_t`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/BitMaskUtil/eq.adoc[`eq`] | Return a mask with only the bit at `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/eq64.adoc[`eq64`] | Return a mask with only the bit at `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/ge.adoc[`ge`] | Return a mask with all bits at or above `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/ge64.adoc[`ge64`] | Return a mask with all bits at or above `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/gt.adoc[`gt`] | Return a mask with all bits above `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/gt64.adoc[`gt64`] | Return a mask with all bits above `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/le.adoc[`le`] | Return a mask with all bits at or below `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/le64.adoc[`le64`] | Return a mask with all bits at or below `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/lt.adoc[`lt`] | Return the unsigned integral value having all bits at positions less than the specified `index` set to 1, and all other bits set to 0. | xref:BloombergLP/bdlb/BitMaskUtil/lt64.adoc[`lt64`] | Return a mask with all bits below `index` set. | xref:BloombergLP/bdlb/BitMaskUtil/ne.adoc[`ne`] | Return a bitmask with the bit at `index` cleared. | xref:BloombergLP/bdlb/BitMaskUtil/ne64.adoc[`ne64`] | Return a bitmask with the bit at `index` cleared. | xref:BloombergLP/bdlb/BitMaskUtil/one.adoc[`one`] | Return a mask with `numBits` bits set starting at `index`. | xref:BloombergLP/bdlb/BitMaskUtil/one64.adoc[`one64`] | Return a mask with `numBits` bits set starting at `index`. | xref:BloombergLP/bdlb/BitMaskUtil/zero.adoc[`zero`] | Return the unsigned integral value having the specified `numBits` starting at the specified `index` set to 0, and all other bits set to 1. | xref:BloombergLP/bdlb/BitMaskUtil/zero64.adoc[`zero64`] | Return a mask with `numBits` bits cleared starting at `index`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#