summaryrefslogtreecommitdiffhomepage
path: root/main-window/mixin-traits.cpp
blob: a374eade9a13d59ae62b3f9a030a5ed940f22f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#define MIXIN_TRAIT_TESTS

#ifdef MIXIN_TRAIT_TESTS
#   include "mixin-traits.hpp"

//namespace mixins::traits_detail {

struct A {};
struct B : A {};
struct C {};

template<> struct mixin_traits<B>
{
    using depends = tuple<A>;
};

template<> struct mixin_traits<A>
{
    using depends = tuple<>;
};

template<> struct mixin_traits<C>
{
    using depends = tuple<A>;
};

extern void test1();

void test1()
{
    //impl<C> fail1;
    impl<B> ok1;
    impl<A> ok2;
}

//} // ns mixins::traits_detail

#endif