[#BloombergLP-bdlb-BitUtil-withBitSet-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitUtil.adoc[BitUtil]::withBitSet :relfileprefix: ../../../ :mrdocs: Return the result of replacing the bit at the specified `index` in the specified `value` with 1, transferring all other bits from `value` unchanged. The behavior is undefined unless `0 <= index < sizeInBits(value)`. == Synopsis Declared in `<bdlb_bitutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static unsigned int withBitSet( unsigned int value, int index); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#