rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ripple::scope_exit< EF > Class Template Reference

#include <scope.h>

Public Member Functions

 ~scope_exit ()
 
 scope_exit (scope_exit &&rhs) noexcept(std::is_nothrow_move_constructible_v< EF >||std::is_nothrow_copy_constructible_v< EF >)
 
scope_exitoperator= (scope_exit &&)=delete
 
template<class EFP >
 scope_exit (EFP &&f, std::enable_if_t< !std::is_same_v< std::remove_cv_t< EFP >, scope_exit > &&std::is_constructible_v< EF, EFP > > *=0) noexcept
 
void release () noexcept
 

Private Attributes

EF exit_function_
 
bool execute_on_destruction_ {true}
 

Detailed Description

template<class EF>
class ripple::scope_exit< EF >

Definition at line 45 of file scope.h.

Constructor & Destructor Documentation

◆ ~scope_exit()

template<class EF >
ripple::scope_exit< EF >::~scope_exit ( )

Definition at line 51 of file scope.h.

◆ scope_exit() [1/2]

template<class EF >
ripple::scope_exit< EF >::scope_exit ( scope_exit< EF > &&  rhs)
noexcept

Definition at line 57 of file scope.h.

◆ scope_exit() [2/2]

template<class EF >
template<class EFP >
ripple::scope_exit< EF >::scope_exit ( EFP &&  f,
std::enable_if_t< !std::is_same_v< std::remove_cv_t< EFP >, scope_exit< EF > > &&std::is_constructible_v< EF, EFP > > *  = 0 
)
explicitnoexcept

Definition at line 70 of file scope.h.

Member Function Documentation

◆ operator=()

template<class EF >
scope_exit & ripple::scope_exit< EF >::operator= ( scope_exit< EF > &&  )
delete

◆ release()

template<class EF >
void ripple::scope_exit< EF >::release ( )
noexcept

Definition at line 83 of file scope.h.

Member Data Documentation

◆ exit_function_

template<class EF >
EF ripple::scope_exit< EF >::exit_function_
private

Definition at line 47 of file scope.h.

◆ execute_on_destruction_

template<class EF >
bool ripple::scope_exit< EF >::execute_on_destruction_ {true}
private

Definition at line 48 of file scope.h.