Derive-C
Loading...
Searching...
No Matches
id.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
derive-c/core/prelude.h
>
4
#include <
derive-c/core/std/reflect.h
>
5
8
#define ID(type, ...) \
9
DC_PUBLIC static size_t type##_hash_id(type const* key) { \
10
DC_STATIC_ASSERT(sizeof(type) <= sizeof(size_t), \
11
"ID hashing only supports up to size_t integers"); \
12
return (size_t)(*key); \
13
}
14
15
DC_INT_REFLECT
(
ID
)
16
17
#undef ID
prelude.h
ID
#define ID(type,...)
Definition
id.h:8
reflect.h
DC_INT_REFLECT
#define DC_INT_REFLECT(F,...)
Definition
reflect.h:11
src
derive-c
algorithm
hash
id.h
Generated by
1.15.0