summaryrefslogtreecommitdiffhomepage
path: root/main-window/mixin-traits.cpp
blob: 4b34eb5bbf66ea208e6cfc7a06788549aa0de8eb (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
39
#pragma once

#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<B>;
};

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

extern void test1();

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

} // ns mixins::traits_detail

#endif