[#BloombergLP-bslim-FormatGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslim.adoc[bslim]::FormatGuard
:relfileprefix: ../../
:mrdocs:

This class implements a guard that saves the state of a `basic&lowbar;ostream` and restores that state upon destruction of the guard&period;

== Synopsis

Declared in `&lt;bslim&lowbar;formatguard&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class FormatGuard;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslim/FormatGuard/2constructor.adoc[`FormatGuard`]         [.small]#[constructor]#
| Create a `FormatGuard` object saving the state of the specified `stream`&period;
| xref:BloombergLP/bslim/FormatGuard/2destructor.adoc[`&#126;FormatGuard`] [.small]#[destructor]#
| Restore all the saved state to the stream that was passed to the constructor&period;
|===



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