diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-03-15 17:55:34 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-03-15 18:00:58 +0000 |
| commit | db9b863222dbd51154c422cf85bc8fafacd5b25b (patch) | |
| tree | c64d4a42ff62372736d747a1ab25568954ba6e32 /src/shell_manager.hh | |
| parent | a49e175727928b8b45c0c2ccdb01f143ea6d18c2 (diff) | |
Migrate WithBitOps template specialization to with_bit_ops function
This way we dont depend on knowing the base template to enable bit ops
on an enum type.
Diffstat (limited to 'src/shell_manager.hh')
| -rw-r--r-- | src/shell_manager.hh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shell_manager.hh b/src/shell_manager.hh index 1336ca9b..df2429d6 100644 --- a/src/shell_manager.hh +++ b/src/shell_manager.hh @@ -3,7 +3,6 @@ #include "array_view.hh" #include "env_vars.hh" -#include "flags.hh" #include "string.hh" #include "utils.hh" #include "completion.hh" @@ -31,6 +30,7 @@ public: None = 0, WaitForStdout = 1 }; + friend constexpr bool with_bit_ops(Meta::Type<Flags>) { return true; } std::pair<String, int> eval(StringView cmdline, const Context& context, StringView input = {}, @@ -49,8 +49,6 @@ private: Vector<EnvVarDesc, MemoryDomain::EnvVars> m_env_vars; }; -template<> struct WithBitOps<ShellManager::Flags> : std::true_type {}; - } #endif // shell_manager_hh_INCLUDED |
