aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/forward-scope-exit.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdbsupport/forward-scope-exit.h
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadgdb-users/simark/clang-format.zip
gdb-users/simark/clang-format.tar.gz
gdb-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/forward-scope-exit.h')
-rw-r--r--gdbsupport/forward-scope-exit.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/gdbsupport/forward-scope-exit.h b/gdbsupport/forward-scope-exit.h
index bf591dd..0972b32 100644
--- a/gdbsupport/forward-scope-exit.h
+++ b/gdbsupport/forward-scope-exit.h
@@ -81,35 +81,28 @@ namespace detail
template<typename Function, Function *function, typename Signature>
struct forward_scope_exit;
-template<typename Function, Function *function,
- typename Res, typename... Args>
+template<typename Function, Function *function, typename Res, typename... Args>
class forward_scope_exit<Function, function, Res (Args...)>
- : public scope_exit_base<forward_scope_exit<Function,
- function,
- Res (Args...)>>
+ : public scope_exit_base<
+ forward_scope_exit<Function, function, Res (Args...)>>
{
/* For access to on_exit(). */
- friend scope_exit_base<forward_scope_exit<Function,
- function,
- Res (Args...)>>;
+ friend scope_exit_base<
+ forward_scope_exit<Function, function, Res (Args...)>>;
public:
- explicit forward_scope_exit (Args ...args)
+ explicit forward_scope_exit (Args... args)
: m_bind_function (function, args...)
{
/* Nothing. */
}
private:
- void on_exit ()
- {
- m_bind_function ();
- }
+ void on_exit () { m_bind_function (); }
/* The function and the arguments passed to the ctor, all packed in
a std::bind. */
- decltype (std::bind (function, std::declval<Args> ()...))
- m_bind_function;
+ decltype (std::bind (function, std::declval<Args> ()...)) m_bind_function;
};
} /* namespace detail */