[#BloombergLP-bdlb-BitMaskUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BitMaskUtil :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bdlb_bitmaskutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BitMaskUtil; ---- == 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 the unsigned integral value having the bit at the specified `index` position set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/eq64.adoc[`eq64`] | Return the unsigned integral value having the bit at the specified `index` position set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/ge.adoc[`ge`] | Return the unsigned integral value having all bits at positions greater than or equal to the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/ge64.adoc[`ge64`] | Return the unsigned integral value having all bits at positions greater than or equal to the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/gt.adoc[`gt`] | Return the unsigned integral value having all bits at positions greater than the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/gt64.adoc[`gt64`] | Return the unsigned integral value having all bits at positions greater than the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/le.adoc[`le`] | Return the unsigned integral value having all bits at positions less than or equal to the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/le64.adoc[`le64`] | Return the unsigned integral value having all bits at positions less than or equal to the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | 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 the unsigned integral value having all bits at positions less than the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/ne.adoc[`ne`] | Return a bitmask with the bit at `index` cleared. | xref:BloombergLP/bdlb/BitMaskUtil/ne64.adoc[`ne64`] | Return the unsigned integral value having the bit at the specified `index` position set to 0, and all other bits set to 1. The behavior is undefined unless `0 <= index <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/one.adoc[`one`] | Return the unsigned integral value having the specified `numBits` starting at the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index`, `0 <= numBits`, and `index + numBits <= # of bits in result`. | xref:BloombergLP/bdlb/BitMaskUtil/one64.adoc[`one64`] | Return the unsigned integral value having the specified `numBits` starting at the specified `index` set to 1, and all other bits set to 0. The behavior is undefined unless `0 <= index`, `0 <= numBits`, and `index + numBits <= # of bits in result`. | 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 the unsigned integral value having the specified `numBits` starting at the specified `index` set to 0, and all other bits set to 1. The behavior is undefined unless `0 <= index`, `0 <= numBits`, and `index + numBits <= # of bits in result`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#