[#BloombergLP-bdlb-ScopeExitUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::ScopeExitUtil
:relfileprefix: ../../
:mrdocs:

Utility providing a factory for type&hyphen;deduced `ScopeExit` guards&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;scopeexit&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct ScopeExitUtil;
----

== Description

A utility that provides a factory function for sufficiently function C&plus;&plus;11 or later platforms to create scope guards using the type&hyphen;deducing `auto` keyword&period; Notice that the utility type does not exist on C&plus;&plus;03 platforms&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/ScopeExitUtil/makeScopeExit.adoc[`makeScopeExit`] 
| Return a `ScopeExit` guard that invokes `function` on destruction&period;
|===



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