[#BloombergLP-bslmt-OnceGuard-setOnce]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/OnceGuard.adoc[OnceGuard]::setOnce
:relfileprefix: ../../../
:mrdocs:

Set this object to guard the specified `once` object&period; The behavior is undefined if this object is currently in the &quot;in&hyphen;progress&quot; state&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;once&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setOnce(xref:BloombergLP/bslmt/Once.adoc[Once]* once);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *once*
| `Once` object to associate with this guard
|===


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