1#include <portable_type.h>
2#include <iostream>
3
4
5struct PortableType {
6 int32_t i32;
7 uintptr_t intptr;
8};
9
10int main(int, char *[]) {
12
13
14
15
16
18 .member(flecs::I32, "i32")
19 .member(flecs::Uptr, "intptr");
20
21
23 .set<PortableType>({10, 20});
24
25
26 const PortableType& ptr = e.get<PortableType>();
28}
flecs::string to_expr(flecs::entity_t tid, const void *value)
Convert a value to a string.
flecs::component< T > component(Args &&... args) const
Find or register a component.
flecs::entity entity(Args &&... args) const
Create an entity.
const char * c_str() const
Return the C string.