Lumiera  0.pre.03
»edit your freedom«
SelfDestructor< TAR > Class Template Reference

#include "lib/several.hpp"

Description

template<class TAR>
class lib::several::SelfDestructor< TAR >

mix-in for self-destruction capabilities

Remarks
the destructor function is assumed to perform deallocation; thus the functor is moved in the local stack frame, where it can be invoked safely; this also serves to prevent re-entrance.

Definition at line 71 of file several.hpp.

Public Member Functions

void destroy ()
 
auto getDtor () const
 
template<class FUN >
void installDestructor (FUN &&dtor)
 
bool isArmed () const
 
TAR * target ()
 

Private Attributes

std::function< void(TAR *)> dtor_ {}
 
+ Inheritance diagram for SelfDestructor< TAR >:
+ Collaboration diagram for SelfDestructor< TAR >:

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