cli11
Loading...
Searching...
No Matches
cli::detail::scope_guard_t< F > Struct Template Reference
module cli11

Runs a closure when it goes out of scope. More...

Public Member Functions

 scope_guard_t (F closure_)
 Takes ownership of the closure.
 ~scope_guard_t ()
 Runs the closure.

Public Attributes

closure
 The closure to run on destruction.

Detailed Description

template<typename F>
struct cli::detail::scope_guard_t< F >

Runs a closure when it goes out of scope.

Template Parameters
FAny callable invocable with no arguments.

Constructor & Destructor Documentation

◆ scope_guard_t()

template<typename F>
cli::detail::scope_guard_t< F >::scope_guard_t ( F closure_)
inlineexplicit

Takes ownership of the closure.

Parameters
closure_The closure to run on destruction.

The documentation for this struct was generated from the following file: