ADTF  3.18.2
scopeguard.h File Reference

Contains code for scope guard classes. More...

Go to the source code of this file.

Classes

class  ScopeGuard< F >
 Scope guard executing a callable object of type F on scope exit. More...
 

Namespaces

 a_util
 Serves as the root component, with common functionality documented in core functionality.
 

Functions

template<class F >
auto scopeExit (F &&f)
 Creates a scope guard executing callable f on scope exit. More...
 

Detailed Description

Contains code for scope guard classes.

These classes facilitate use of the RAII idiom to perform cleanup work or resource management. They are based on Andrei Alexandrescu's talk “Declarative Control Flow" (https://www.youtube.com/watch?v=WjTrfoiB0MQ)

Definition in file scopeguard.h.