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>
requires ( !std::is_same_v<std::remove_cv_t<EFP>, ScopeFail> && std::is_constructible_v<EF, EFP>)
 ScopeFail (EFP &&f) 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 68 of file scope.h.

Constructor & Destructor Documentation

◆ ~ScopeFail()

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

Definition at line 75 of file scope.h.

◆ ScopeFail() [1/2]

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

Definition at line 81 of file scope.h.

◆ ScopeFail() [2/2]

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

Definition at line 94 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 103 of file scope.h.

Member Data Documentation

◆ exitFunction_

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

Definition at line 70 of file scope.h.

◆ executeOnDestruction_

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

Definition at line 71 of file scope.h.

◆ uncaughtOnCreation_

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

Definition at line 72 of file scope.h.