qxLib
Public Member Functions | List of all members
qx::destruction_callback Class Reference

Class for RAII: functor passed in constructor will be called in destructor. More...

#include <destruction_callback.h>

Public Member Functions

template<class destroyer_t >
 destruction_callback (destroyer_t destroyer)
 destruction_callback object constructor More...
 

Detailed Description

Class for RAII: functor passed in constructor will be called in destructor.

Author
Khrapov
Date
12.12.2021

Definition at line 24 of file destruction_callback.h.

Constructor & Destructor Documentation

◆ destruction_callback()

template<class destroyer_t >
qx::destruction_callback::destruction_callback ( destroyer_t  destroyer)
inline

destruction_callback object constructor

Template Parameters
destroyer_t- callable type
Parameters
destroyer- functor that will be called when object is destroyed

Definition at line 41 of file destruction_callback.h.


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