diff options
Diffstat (limited to 'main-window/mixin-traits.hpp')
-rw-r--r-- | main-window/mixin-traits.hpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/main-window/mixin-traits.hpp b/main-window/mixin-traits.hpp deleted file mode 100644 index 45df7fdb..00000000 --- a/main-window/mixin-traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "compat/meta.hpp" - -#include <type_traits> - -namespace mixins::traits_detail { - - using namespace meta; - - template<typename... xs> using tuple = tuple_<xs...>; - - template<typename t> - struct mixin_traits { - // implement this! - //using depends = tuple<>; - }; - - template<typename klass, typename...> struct check_depends_; - - template<typename klass> - struct check_depends_<klass> : std::true_type - { - }; - - template<typename klass, typename x, typename... xs> - struct check_depends_<klass, x, xs...> : - std::bool_constant< - std::is_base_of_v<x, klass> && - lift_v<check_depends_, cons<klass, typename mixin_traits<x>::depends>> && - check_depends_<klass, xs...>::value - > - { - }; - - template<typename klass, typename... xs> - struct impl - { - static_assert(lift<check_depends_, tuple<klass, xs...>>::value, - "class must inherit dependent mixins"); - }; -} // ns mixins::traits_detail |