summaryrefslogtreecommitdiffhomepage
path: root/main-window/mixin-traits.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-11-03 06:48:51 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-11-03 06:48:51 +0100
commit310ca879118282f25b6cb2ae681627934278607a (patch)
tree71221b30269f84ceb75610960af8f963df94a7ed /main-window/mixin-traits.hpp
parent0148a75d4b5301d279dd8c29ecbaeb9c85cf9efb (diff)
fix some mixin stuff, still not done
Diffstat (limited to 'main-window/mixin-traits.hpp')
-rw-r--r--main-window/mixin-traits.hpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/main-window/mixin-traits.hpp b/main-window/mixin-traits.hpp
index 6a0206fc..45df7fdb 100644
--- a/main-window/mixin-traits.hpp
+++ b/main-window/mixin-traits.hpp
@@ -13,11 +13,7 @@ namespace mixins::traits_detail {
template<typename t>
struct mixin_traits {
// implement this!
- using depends = tuple<>;
-
- // unconditional but at instantiation time
- static_assert(sizeof(t) < sizeof(char),
- "must specialize mixin_traits");
+ //using depends = tuple<>;
};
template<typename klass, typename...> struct check_depends_;
@@ -31,7 +27,7 @@ namespace mixins::traits_detail {
struct check_depends_<klass, x, xs...> :
std::bool_constant<
std::is_base_of_v<x, klass> &&
- lift<check_depends_, cons<klass, typename mixin_traits<x>::depends>>::value &&
+ lift_v<check_depends_, cons<klass, typename mixin_traits<x>::depends>> &&
check_depends_<klass, xs...>::value
>
{
@@ -40,8 +36,7 @@ namespace mixins::traits_detail {
template<typename klass, typename... xs>
struct impl
{
- static constexpr bool class_must_inherit_dependent_mixins =
- lift<check_depends_, tuple<klass, xs...>>::value;
- static_assert(class_must_inherit_dependent_mixins);
+ static_assert(lift<check_depends_, tuple<klass, xs...>>::value,
+ "class must inherit dependent mixins");
};
} // ns mixins::traits_detail