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