Mercurial > octave
diff liboctave/util/action-container.h @ 29251:30a5e691dd9f
allow unwind_action functions to be empty and set after object creation
* unwind-prot.h (unwind_action::unwind_action): New overload that
allows unwind_action to be created without a valid function.
(unwind_action::set): New functions. Allow action to be changed or
set to an invalid function.
(unwind_action::run): New function. Skip action if it is invalid.
(unwind_action::~unwind_action): Use run to execute action.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 03 Jan 2021 14:37:13 -0500 |
parents | 6b3faa844395 |
children | 7854d5752dd2 |
line wrap: on
line diff
--- a/liboctave/util/action-container.h Sun Jan 03 20:19:04 2021 +0100 +++ b/liboctave/util/action-container.h Sun Jan 03 14:37:13 2021 -0500 @@ -70,6 +70,9 @@ { public: + // FIXME: Do we need to apply std::forward to the arguments to + // std::bind here? + template <typename F, typename... Args> fcn_elem (F&& fcn, Args&&... args) : m_fcn (std::bind (fcn, args...))