[#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&period; If `once` is not specified, then it must be set later using the `setOnce` method before other methods may be called&period;

== Synopsis

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

[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]#
