tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
scope_exit< FuncT > Struct Template Reference

The class template scope_exit is a general-purpose scope guard intended to call its exit function when a scope is exited. More...

#include <scope_exit.hpp>

Inheritance diagram for scope_exit< FuncT >:

Detailed Description

template<typename FuncT>
struct etl::scope_exit< FuncT >

The class template scope_exit is a general-purpose scope guard intended to call its exit function when a scope is exited.

A scope_exit may be either active, i.e. calls its exit function on destruction, or inactive, i.e. does nothing on destruction. A scope_exit is active after constructed from an exit function. A scope_exit can become inactive by calling release() on it either manually or automatically (by the move constructor). An inactive scope_exit may also be obtained by initializing with another inactive scope_exit. Once a scope_exit is inactive, it cannot become active again.


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