From b0d763d032a122bbf0465fa37a2eaaff3fd3a916 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 14 Jul 2018 09:01:16 +0200 Subject: wip --- main-window/mixin-traits.cpp | 6 +++--- main-window/mixin-traits.hpp | 21 ++------------------- 2 files changed, 5 insertions(+), 22 deletions(-) (limited to 'main-window') 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 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 -//namespace mixins::traits_detail { +namespace mixins::traits_detail { using namespace meta; template @@ -39,27 +39,10 @@ using type = std::bool_constant; }; -#if 0 - template - static constexpr void check_depends_recursively() - { - std::is_base_of_v && - assert_depends::check_depends() - - using depends = typename mixin_traits::depends; - static_assert(lift>::check_depends()); - - using car = first; - using cdr = rest; - - check_depends_recursively(); - } -#endif - template class impl { using t1 = typename lift::depends>>::type; static_assert(t1::value); }; -//} // ns mixins::traits_detail +} // ns mixins::traits_detail -- cgit v1.2.3