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
13
DERIVE_STD_SIMPLE
(
bool
)
14
DERIVE_STD_SIMPLE
(
char
)
15
DERIVE_STD_SIMPLE
(int8_t)
16
DERIVE_STD_SIMPLE
(uint8_t)
17
DERIVE_STD_SIMPLE
(int16_t)
18
DERIVE_STD_SIMPLE
(uint16_t)
19
DERIVE_STD_SIMPLE
(int32_t)
20
DERIVE_STD_SIMPLE
(uint32_t)
21
DERIVE_STD_SIMPLE
(int64_t)
22
DERIVE_STD_SIMPLE
(uint64_t)
23
DERIVE_STD_SIMPLE
(
size_t
)
24
DERIVE_STD_SIMPLE
(
float
)
25
DERIVE_STD_SIMPLE
(
double
)
core.h
DERIVE_STD_SIMPLE
#define DERIVE_STD_SIMPLE(t)
Definition
std.h:7
src
derive-c
derives
std.h
Generated by
1.13.2