#include <scopeguard.hpp>
 
Definition at line 16 of file scopeguard.hpp.
 
◆ ScopeGuard() [1/2]
  
  
      
        
          | dl::utils::ScopeGuard::ScopeGuard  | 
          ( | 
          auto &&  | 
          onScopeExit | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
Definition at line 24 of file scopeguard.hpp.
   24                                                    : onScopeExit(
std::forward<
decltype(onScopeExit)>(onScopeExit)) {
 
   25        } catch (...) {
   26            onScopeExit();
   27            throw;
   28        }
 
 
 
◆ ScopeGuard() [2/2]
  
  
      
        
          | dl::utils::ScopeGuard::ScopeGuard  | 
          ( | 
          ScopeGuard &&  | 
          other | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
Definition at line 30 of file scopeguard.hpp.
   30                                                : onScopeExit(
std::move(other.onScopeExit)) {
 
   31            assert(other.onScopeExit == nullptr);
   32        }
 
 
 
◆ ~ScopeGuard()
  
  
      
        
          | dl::utils::ScopeGuard::~ScopeGuard  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 34 of file scopeguard.hpp.
   34                      {
   35            if (onScopeExit != nullptr)
   36                onScopeExit();
   37        }
 
 
 
The documentation for this class was generated from the following file: