MySQL 8.4.3
Source Code Documentation
scope_guard.h File Reference

Go to the source code of this file.

Classes

class  Scope_guard< TLambda >
 A Lambda to be called at scope exit. More...
 
class  Variable_scope_guard< T >
 Template class to scope guard variables. More...
 

Functions

template<typename TLambda >
Scope_guard< TLambda > create_scope_guard (const TLambda rollback_lambda)
 Create a scope guard object. More...
 

Function Documentation

◆ create_scope_guard()

template<typename TLambda >
Scope_guard< TLambda > create_scope_guard ( const TLambda  rollback_lambda)

Create a scope guard object.

Always use this instead of the Scope_guard template itself!

See also
Scope_guard
Template Parameters
TLambdaThe type of the lambda. Inferred, never specify it.
Parameters
rollback_lambdaThe lambda to execute.
Returns
Scope_guard<TLambda> An specialization of the Scope_guard template.