1#ifndef XRPL_BASICS_SCOPE_H_INCLUDED
2#define XRPL_BASICS_SCOPE_H_INCLUDED
4#include <xrpl/beast/utility/instrumentation.h>
158 0) noexcept(
std::is_nothrow_constructible_v<EF, EFP> ||
std::is_nothrow_constructible_v<EF, EFP&>)
210template <
class Mutex>
221 "ripple::scope_unlock::scope_unlock : mutex must be locked");
236template <
class Mutex>
scope_exit(scope_exit &&rhs) noexcept(std::is_nothrow_move_constructible_v< EF >||std::is_nothrow_copy_constructible_v< EF >)
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
scope_exit & operator=(scope_exit &&)=delete
bool execute_on_destruction_
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
int uncaught_on_creation_
scope_fail & operator=(scope_fail &&)=delete
bool execute_on_destruction_
scope_fail(scope_fail &&rhs) noexcept(std::is_nothrow_move_constructible_v< EF >||std::is_nothrow_copy_constructible_v< EF >)
bool execute_on_destruction_
scope_success & operator=(scope_success &&)=delete
scope_success(scope_success &&rhs) noexcept(std::is_nothrow_move_constructible_v< EF >||std::is_nothrow_copy_constructible_v< EF >)
int uncaught_on_creation_
~scope_success() noexcept(noexcept(exit_function_()))
scope_success(EFP &&f, std::enable_if_t< !std::is_same_v< std::remove_cv_t< EFP >, scope_success > &&std::is_constructible_v< EF, EFP > > *=0) noexcept(std::is_nothrow_constructible_v< EF, EFP >||std::is_nothrow_constructible_v< EF, EFP & >)
Automatically unlocks and re-locks a unique_lock object.
scope_unlock(std::unique_lock< Mutex > &lock) noexcept(true)
scope_unlock & operator=(scope_unlock const &)=delete
std::unique_lock< Mutex > * plock
~scope_unlock() noexcept(true)
scope_unlock(scope_unlock const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
T uncaught_exceptions(T... args)