[#BloombergLP-bdlc-BitArray-toggle-0d1]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::toggle
:relfileprefix: ../../../
:mrdocs:

`toggle` overloads

== Synopses

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

Complement the value of the bit at the specified `index` in this array&period; The behavior is undefined unless `index &lt; length()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/BitArray/toggle-0a.adoc[toggle](std::size&lowbar;t index);
----

[.small]#xref:BloombergLP/bdlc/BitArray/toggle-0a.adoc[_» more&period;&period;&period;_]#

Complement `numBits` bits in this array beginning at `index`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/BitArray/toggle-0db.adoc[toggle](
    std::size&lowbar;t index,
    std::size&lowbar;t numBits);
----

[.small]#xref:BloombergLP/bdlc/BitArray/toggle-0db.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| bit position to complement
| *numBits*
| number of bits to complement
|===


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