[#bsl-bitset-set-0c]
= xref:bsl.adoc[bsl]::xref:bsl/bitset.adoc[bitset]::set
:relfileprefix: ../../
:mrdocs:

`set` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;bitset&period;h&gt;`

Set all bits of this bitset to 1&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/bitset.adoc[bitset&lt;N&gt;]&
xref:bsl/bitset/set-06.adoc[set]() noexcept;
----

[.small]#xref:bsl/bitset/set-06.adoc[_» more&period;&period;&period;_]#

Set the bit at the specified `pos` to 1, or to `val` if supplied&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/bitset.adoc[bitset&lt;N&gt;]&
xref:bsl/bitset/set-04.adoc[set](
    std::size&lowbar;t pos,
    int val = true);
----

[.small]#xref:bsl/bitset/set-04.adoc[_» more&period;&period;&period;_]#

== Return Value

reference to this modifiable bitset

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pos*
| index of the bit to set
| *val*
| value to assign to the bit (default true)
|===


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