rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
xrpl::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 xrpl::scope_exit< EF >

Definition at line 25 of file scope.h.

Constructor & Destructor Documentation

◆ ~scope_exit()

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

Definition at line 31 of file scope.h.

◆ scope_exit() [1/2]

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

Definition at line 37 of file scope.h.

◆ scope_exit() [2/2]

template<class EF >
template<class EFP >
xrpl::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 48 of file scope.h.

Member Function Documentation

◆ operator=()

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

◆ release()

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

Definition at line 58 of file scope.h.

Member Data Documentation

◆ exit_function_

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

Definition at line 27 of file scope.h.

◆ execute_on_destruction_

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

Definition at line 28 of file scope.h.