-
Notifications
You must be signed in to change notification settings - Fork 54
/
main.cpp
43 lines (39 loc) · 852 Bytes
/
main.cpp
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
40
41
42
43
#include <UECS/UECS.hpp>
#include <iostream>
using namespace Ubpa::UECS;
using namespace std;
struct alignas(1) A {
A() { cout << "A: " << this << endl; }
char pad[13];
};
struct alignas(4) B {
B() { cout << "B: " << this << endl; }
char pad[28];
};
struct alignas(1) C {
C() { cout << "C: " << this << endl; }
char pad[15];
};
struct alignas(2) D {
D() { cout << "D: " << this << endl; }
char pad[10];
};
struct alignas(8) E {
E() { cout << "E: " << this << endl; }
char pad[24];
};
struct alignas(16) F {
F() { cout << "F: " << this << endl; }
char pad[32];
};
struct alignas(256) G {
G() { cout << "G: " << this << endl; }
char pad[256];
};
int main() {
World w;
w.entityMngr.cmptTraits.Register<A, B, C, D, E, F, G>();
auto e = w.entityMngr.Create(Ubpa::TypeIDs_of<A, B, C, D, E, F, G>);
w.entityMngr.Destroy(e);
return 0;
}