Derive-C
Loading...
Searching...
No Matches
eq.h
Go to the documentation of this file.
1#include <derive-c/core.h>
2#include <stdbool.h>
3
4#define DERIVE_EQ_MEMBER(t, n) &&NAME(t, eq)(&self_1->n, &self_2->n)
5
6#define DERIVE_EQ(ID) \
7 bool NAME(ID, eq)(ID const* self_1, ID const* self_2) { \
8 return true NAME(ID, REFLECT)(DERIVE_EQ_MEMBER); \
9 }