xrpld
Loading...
Searching...
No Matches
xrpl::ScopeFail< EF > Class Template Reference

#include <scope.h>

Public Member Functions

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

Private Attributes

EF exitFunction_
bool executeOnDestruction_ {true}
int uncaughtOnCreation_ {std::uncaught_exceptions()}

Detailed Description

template<class EF>
class xrpl::ScopeFail< EF >

Definition at line 70 of file scope.h.

Constructor & Destructor Documentation

◆ ~ScopeFail()

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

Definition at line 77 of file scope.h.

◆ ScopeFail() [1/2]

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

Definition at line 83 of file scope.h.

◆ ScopeFail() [2/2]

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

Definition at line 96 of file scope.h.

Member Function Documentation

◆ operator=()

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

◆ release()

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

Definition at line 107 of file scope.h.

Member Data Documentation

◆ exitFunction_

template<class EF>
EF xrpl::ScopeFail< EF >::exitFunction_
private

Definition at line 72 of file scope.h.

◆ executeOnDestruction_

template<class EF>
bool xrpl::ScopeFail< EF >::executeOnDestruction_ {true}
private

Definition at line 73 of file scope.h.

◆ uncaughtOnCreation_

template<class EF>
int xrpl::ScopeFail< EF >::uncaughtOnCreation_ {std::uncaught_exceptions()}
private

Definition at line 74 of file scope.h.