26 #if ! defined (octave_unwind_prot_h)
27 #define octave_unwind_prot_h 1
29 #include "octave-config.h"
60 operator bool (
void)
const {
return ! empty (); }
67 std::unique_ptr<elem> ptr (m_lifo.top ());
77 elem *ptr = m_lifo.top ();
83 size_t size (
void)
const {
return m_lifo.size (); }
89 m_lifo.push (new_elem);
105 void warn_unhandled_exception (
void)
const;
127 warn_unhandled_exception ();
169 template <
typename F,
typename... Args>
171 :
m_fcn (std::bind (fcn, args...))
221 template <
typename T>
std::function< void(void)> m_fcn
unwind_action & operator=(const unwind_action &)=delete
unwind_action(F &&fcn, Args &&... args)
unwind_action(const unwind_action &)=delete
~unwind_protect_safe(void)
unwind_protect_safe(void)
unwind_protect_safe(const unwind_protect_safe &)=delete
unwind_protect_var(T &ref, const T &new_val)
unwind_protect_var(T &ref)
~unwind_protect_var(void)
unwind_protect_var & operator=(const unwind_protect_var &)=delete
unwind_protect_var(const unwind_protect_var &)=delete
unwind_protect(const unwind_protect &)=delete
virtual void add_action(elem *new_elem)
std::stack< elem * > m_lifo