Derive-C
Loading...
Searching...
No Matches
std.h
Go to the documentation of this file.
1#include <derive-c/core.h>
2
3#include <stdbool.h>
4#include <stdint.h>
5#include <stdlib.h>
6
7#define DERIVE_STD_SIMPLE(t) \
8 bool NAME(t, eq)(t const* self_1, t const* self_2) { return *self_1 == *self_2; } \
9 t NAME(t, clone)(t const* self) { return *self; } \
10 bool NAME(t, gt)(t const* self_1, t const* self_2) { return *self_1 > *self_2; } \
11 bool NAME(t, lt)(t const* self_1, t const* self_2) { return *self_1 < *self_2; }
12
16DERIVE_STD_SIMPLE(uint8_t)
17DERIVE_STD_SIMPLE(int16_t)
18DERIVE_STD_SIMPLE(uint16_t)
19DERIVE_STD_SIMPLE(int32_t)
20DERIVE_STD_SIMPLE(uint32_t)
21DERIVE_STD_SIMPLE(int64_t)
22DERIVE_STD_SIMPLE(uint64_t)
#define DERIVE_STD_SIMPLE(t)
Definition std.h:7