-
-
Notifications
You must be signed in to change notification settings - Fork 586
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (22 loc) · 571 Bytes
/
main.cpp
File metadata and controls
29 lines (22 loc) · 571 Bytes
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
#include <no_enum_reflection.h>
#include <iostream>
enum Color {
Red, Green, Blue
};
int main(int argc, char *argv[]) {
flecs::world world(argc, argv);
auto c = world.component<Color>();
if (c.lookup("Red") != 0) {
printf("enum constant should not be defined\n");
return -1;
}
if (c.lookup("Green") != 0) {
printf("enum constant should not be defined\n");
return -1;
}
if (c.lookup("Blue") != 0) {
printf("enum constant should not be defined\n");
return -1;
}
return 0;
}