diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-11-22 21:48:26 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-11-22 21:50:51 +1100 |
| commit | cb1b03c0db91d85db3545a49f68d63fad0fe137c (patch) | |
| tree | bf8ba71c18a74d8bc1ebb38df246a3b0d87ad256 /src/utils.hh | |
| parent | 22d9ffa63ac22d3823c41b4671e0565a92cf8619 (diff) | |
Add support for markup in info boxes
Fixes #2552
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils.hh b/src/utils.hh index f9c53509..0979aebe 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -186,6 +186,18 @@ private: Invoker* m_invoker; }; +template<typename... Funcs> +struct Overload : Funcs... +{ + using Funcs::operator()...; +}; + +template<typename... Funcs> +auto overload(Funcs&&... funcs) +{ + return Overload<std::decay_t<Funcs>...>{std::forward<Funcs>(funcs)...}; +} + } #endif // utils_hh_INCLUDED |
