[#BloombergLP-bslmt-OnceGuard-2constructor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/OnceGuard.adoc[OnceGuard]::OnceGuard :relfileprefix: ../../../ :mrdocs: Initialize this object to guard the (optionally) specified `once` object. If `once` is not specified, then it must be set later using the `setOnce` method before other methods may be called. == Synopsis Declared in `<bslmt_once.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit OnceGuard(xref:BloombergLP/bslmt/Once.adoc[Once]* once = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#