diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-06-29 14:04:29 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-06-29 14:04:29 +1000 |
| commit | 7919240dcf4a373d3bd7a4e6d23d1815cc13dc24 (patch) | |
| tree | bbd6527ee825c20f483f43d695bd1bcd5c6d93e1 /src/utils.hh | |
| parent | 8561c2377c287a86e4603f5880606b64c3432dc1 (diff) | |
Fix compilation with compilers not supporting auto(x)
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.hh b/src/utils.hh index 4b84ce75..b517735f 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -73,6 +73,9 @@ public: { other.m_valid = false; } [[gnu::always_inline]] + void trigger() { if (m_valid) m_func(); m_valid = false; } + + [[gnu::always_inline]] ~OnScopeEnd() noexcept(noexcept(m_func())) { if (m_valid) m_func(); } private: |
