[#BloombergLP-bdlc-BitArray-assignBits]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::assignBits
:relfileprefix: ../../../
:mrdocs:

Assign low&hyphen;order bits from `srcBits` into this array at `index`&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;bitarray&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
assignBits(
    std::size&lowbar;t index,
    uint64&lowbar;t srcBits,
    std::size&lowbar;t numBits);
----

== Description

Assign the low&hyphen;order specified `numBits` from the specified `srcBits` to this object, starting at the specified `index`&period; The behavior is undefined unless `numBits &lt;&equals; k&lowbar;BITS&lowbar;PER&lowbar;UINT64` and `index &plus; numBits &lt;&equals; length()`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| starting bit position in this array
| *srcBits*
| source word whose low&hyphen;order bits are assigned
| *numBits*
| number of low&hyphen;order bits to assign
|===


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