[#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. The behavior is undefined if this object is currently in the "in‐progress" state. == Synopsis Declared in `<bslmt_once.h>` [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]#