summaryrefslogtreecommitdiffhomepage
path: root/main-window
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-14 09:01:16 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-24 00:43:04 +0200
commitb0d763d032a122bbf0465fa37a2eaaff3fd3a916 (patch)
treeca9466cb887581ecc0d949006c8974dd3d35ee0d /main-window
parent5c716a65a38dfdf79fa0a64e9c25b49d6e722326 (diff)
wip
Diffstat (limited to 'main-window')
-rw-r--r--main-window/mixin-traits.cpp6
-rw-r--r--main-window/mixin-traits.hpp21
2 files changed, 5 insertions, 22 deletions
diff --git a/main-window/mixin-traits.cpp b/main-window/mixin-traits.cpp
index a374eade..ea8e9bc8 100644
--- a/main-window/mixin-traits.cpp
+++ b/main-window/mixin-traits.cpp
@@ -1,9 +1,9 @@
-#define MIXIN_TRAIT_TESTS
+//#define MIXIN_TRAIT_TESTS
#ifdef MIXIN_TRAIT_TESTS
# include "mixin-traits.hpp"
-//namespace mixins::traits_detail {
+namespace mixins::traits_detail {
struct A {};
struct B : A {};
@@ -33,6 +33,6 @@ void test1()
impl<A> ok2;
}
-//} // ns mixins::traits_detail
+} // ns mixins::traits_detail
#endif
diff --git a/main-window/mixin-traits.hpp b/main-window/mixin-traits.hpp
index 07eec98d..84a64d08 100644
--- a/main-window/mixin-traits.hpp
+++ b/main-window/mixin-traits.hpp
@@ -6,7 +6,7 @@
#include <type_traits>
-//namespace mixins::traits_detail {
+namespace mixins::traits_detail {
using namespace meta;
template<typename... xs>
@@ -39,27 +39,10 @@
using type = std::bool_constant<b1::value && b2::value && b3::value>;
};
-#if 0
- template<typename final_class, typename t>
- static constexpr void check_depends_recursively()
- {
- std::is_base_of_v<x, final_class> &&
- assert_depends<final_class, xs...>::check_depends()
-
- using depends = typename mixin_traits<t>::depends;
- static_assert(lift<assert_depends, cons<t, depends>>::check_depends());
-
- using car = first<depends>;
- using cdr = rest<depends>;
-
- check_depends_recursively<car>();
- }
-#endif
-
template<typename t>
class impl
{
using t1 = typename lift<check_depends_, cons<t, typename mixin_traits<t>::depends>>::type;
static_assert(t1::value);
};
-//} // ns mixins::traits_detail
+} // ns mixins::traits_detail