EntityComponentMetaSystem
An implementation of an EntityComponent System with template meta-programming.
Loading...
Searching...
No Matches
Combine.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_COMBINE_HPP
8#define EC_META_COMBINE_HPP
9
10#include "TypeList.hpp"
11
12namespace EC
13{
14 namespace Meta
15 {
16 template <typename TTypeListA, typename TTypeListB>
18 {
19 using type = TypeList<>;
20 };
21
22 template <
23 template <typename...> class TTypeListA,
24 template <typename...> class TTypeListB,
25 typename... TypesA, typename... TypesB>
26 struct CombineHelper<TTypeListA<TypesA...>, TTypeListB<TypesB...> >
27 {
28 using type = TypeList<TypesA..., TypesB...>;
29 };
30
31 template <typename TTypeListA, typename TTypeListB>
32 using Combine = typename CombineHelper<TTypeListA, TTypeListB>::type;
33 }
34}
35
36#endif
37
Definition Combine.hpp:18
Definition TypeList.hpp:16