EntityComponentMetaSystem
An implementation of an EntityComponent System with template meta-programming.
Loading...
Searching...
No Matches
src
EC
Meta
ContainsAll.hpp
1
2
// This work derives from Vittorio Romeo's code used for cppcon 2015 licensed
3
// under the Academic Free License.
4
// His code is available here: https://github.com/SuperV1234/cppcon2015
5
6
7
#ifndef EC_META_CONTAINS_ALL_HPP
8
#define EC_META_CONTAINS_ALL_HPP
9
10
#include "TypeList.hpp"
11
#include "Contains.hpp"
12
13
namespace
EC
14
{
15
namespace
Meta
16
{
17
template
<
typename
TTypeListA,
typename
TTypeListB>
18
struct
ContainsAllHelper
:
19
std::true_type
20
{
21
};
22
23
template
<
24
template
<
typename
...>
class
TTypeListA,
25
typename
Type,
26
typename
... Types,
27
typename
TTypeListB>
28
struct
ContainsAllHelper
<TTypeListA<Type, Types...>, TTypeListB> :
29
std::conditional<
30
Contains<Type, TTypeListB>::value,
31
ContainsAllHelper<TypeList<Types...>, TTypeListB>,
32
std::false_type
33
>::type
34
{
35
};
36
37
template
<
typename
TTypeListA,
typename
TTypeListB>
38
using
ContainsAll = std::integral_constant<
39
bool,
ContainsAllHelper<TTypeListA, TTypeListB>::value
>;
40
}
41
}
42
43
#endif
44
EC::Meta::ContainsAllHelper
Definition
ContainsAll.hpp:20
Generated by
1.9.8