rippled
Public Member Functions | Private Attributes | List of all members
ripple::scope_fail< EF > Class Template Reference

Public Member Functions

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

Private Attributes

EF exit_function_
 
bool execute_on_destruction_ {true}
 
int uncaught_on_creation_ {std::uncaught_exceptions()}
 

Detailed Description

template<class EF>
class ripple::scope_fail< EF >

Definition at line 90 of file scope.h.

Constructor & Destructor Documentation

◆ ~scope_fail()

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

Definition at line 97 of file scope.h.

◆ scope_fail() [1/2]

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

Definition at line 104 of file scope.h.

◆ scope_fail() [2/2]

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

Definition at line 118 of file scope.h.

Member Function Documentation

◆ operator=()

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

◆ release()

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

Definition at line 131 of file scope.h.

Member Data Documentation

◆ exit_function_

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

Definition at line 92 of file scope.h.

◆ execute_on_destruction_

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

Definition at line 93 of file scope.h.

◆ uncaught_on_creation_

template<class EF >
int ripple::scope_fail< EF >::uncaught_on_creation_ {std::uncaught_exceptions()}
private

Definition at line 94 of file scope.h.