open62541pp 0.15.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::detail::ScopeExit< Fn > Class Template Reference

#include <scope.hpp>

Detailed Description

template<typename Fn>
class opcua::detail::ScopeExit< Fn >

General-purpose scope guard intended to call its exit function when a scope is exited.

See also
https://en.cppreference.com/w/cpp/experimental/scope_exit

Definition at line 14 of file scope.hpp.

Public Member Functions

 ScopeExit (Fn &&fn) noexcept
 
 ScopeExit (ScopeExit &&other) noexcept
 
 ~ScopeExit () noexcept(std::is_nothrow_invocable_v< Fn >)
 
 ScopeExit (const ScopeExit &)=delete
 
ScopeExitoperator= (const ScopeExit &)=delete
 
ScopeExitoperator= (ScopeExit &&)=delete
 
void release () noexcept
 

Constructor & Destructor Documentation

◆ ScopeExit() [1/3]

template<typename Fn >
opcua::detail::ScopeExit< Fn >::ScopeExit ( Fn && fn)
inlineexplicitnoexcept

Definition at line 19 of file scope.hpp.

◆ ScopeExit() [2/3]

template<typename Fn >
opcua::detail::ScopeExit< Fn >::ScopeExit ( ScopeExit< Fn > && other)
inlinenoexcept

Definition at line 22 of file scope.hpp.

◆ ~ScopeExit()

template<typename Fn >
opcua::detail::ScopeExit< Fn >::~ScopeExit ( )
inlinenoexcept

Definition at line 28 of file scope.hpp.

◆ ScopeExit() [3/3]

template<typename Fn >
opcua::detail::ScopeExit< Fn >::ScopeExit ( const ScopeExit< Fn > & )
delete

Member Function Documentation

◆ operator=() [1/2]

template<typename Fn >
ScopeExit & opcua::detail::ScopeExit< Fn >::operator= ( const ScopeExit< Fn > & )
delete

◆ operator=() [2/2]

template<typename Fn >
ScopeExit & opcua::detail::ScopeExit< Fn >::operator= ( ScopeExit< Fn > && )
delete

◆ release()

template<typename Fn >
void opcua::detail::ScopeExit< Fn >::release ( )
inlinenoexcept

Definition at line 38 of file scope.hpp.