#pragma once #include "compat/linkage-macros.hpp" #include "compat/macros.hpp" #include "compat/meta.hpp" #include namespace mixins::traits_detail { using namespace meta; template using tuple = meta::detail::tuple; template struct mixin_traits { using depends = tuple<>; }; template struct check_depends_; template struct check_depends_ { static constexpr bool recurse() { return true; } }; template struct check_depends_ { static constexpr bool recurse() { using depends = typename mixin_traits::depends; return (std::is_base_of_v || std::is_same_v) && check_depends_::recurse() && lift>::recurse(); } }; #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 { static_assert(lift::depends>>::recurse()); }; } // ns mixins::traits_detail