[#BloombergLP-bdlb-BitMaskUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BitMaskUtil
:relfileprefix: ../../
:mrdocs:

Namespace for functions that produce 32&hyphen; and 64&hyphen;bit bit masks&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;bitmaskutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct BitMaskUtil;
----

== Description

This utility `struct` provides a namespace for a set of bit&hyphen;level, stateless functions that take one or two `int` arguments and return masks of the built&hyphen;in 32&hyphen; and 64&hyphen;bit integer types `uint32&lowbar;t` and `uint64&lowbar;t`, respectively&period;

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/BitMaskUtil/_04enum.adoc[`Unnamed enum`] 
| Number of bits in type `uint32&lowbar;t`&period;
|===


== 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&period;
| xref:BloombergLP/bdlb/BitMaskUtil/eq64.adoc[`eq64`] 
| Return a mask with only the bit at `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/ge.adoc[`ge`] 
| Return a mask with all bits at or above `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/ge64.adoc[`ge64`] 
| Return a mask with all bits at or above `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/gt.adoc[`gt`] 
| Return a mask with all bits above `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/gt64.adoc[`gt64`] 
| Return a mask with all bits above `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/le.adoc[`le`] 
| Return a mask with all bits at or below `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/le64.adoc[`le64`] 
| Return a mask with all bits at or below `index` set&period;
| 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&period;
| xref:BloombergLP/bdlb/BitMaskUtil/lt64.adoc[`lt64`] 
| Return a mask with all bits below `index` set&period;
| xref:BloombergLP/bdlb/BitMaskUtil/ne.adoc[`ne`] 
| Return a bitmask with the bit at `index` cleared&period;
| xref:BloombergLP/bdlb/BitMaskUtil/ne64.adoc[`ne64`] 
| Return a bitmask with the bit at `index` cleared&period;
| xref:BloombergLP/bdlb/BitMaskUtil/one.adoc[`one`] 
| Return a mask with `numBits` bits set starting at `index`&period;
| xref:BloombergLP/bdlb/BitMaskUtil/one64.adoc[`one64`] 
| Return a mask with `numBits` bits set starting at `index`&period;
| 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&period;
| xref:BloombergLP/bdlb/BitMaskUtil/zero64.adoc[`zero64`] 
| Return a mask with `numBits` bits cleared starting at `index`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
