Derive-C
Loading...
Searching...
No Matches
eq.h File Reference
#include <derive-c/core/helpers.h>
#include <stdbool.h>
Include dependency graph for eq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DERIVE_EQ_MEMBER(t, n)
#define DERIVE_EQ(ID)

Macro Definition Documentation

◆ DERIVE_EQ

#define DERIVE_EQ ( ID)
Value:
bool NS(ID, eq)(ID const* self_1, ID const* self_2) { \
return true NS(ID, REFLECT)(DERIVE_EQ_MEMBER); \
}
#define DERIVE_EQ_MEMBER(t, n)
Definition eq.h:4
#define ID(type)
Definition hashers.h:18
#define NS(pre, post)
Definition helpers.h:6

Definition at line 6 of file eq.h.

6#define DERIVE_EQ(ID) \
7 bool NS(ID, eq)(ID const* self_1, ID const* self_2) { \
8 return true NS(ID, REFLECT)(DERIVE_EQ_MEMBER); \
9 }

◆ DERIVE_EQ_MEMBER

#define DERIVE_EQ_MEMBER ( t,
n )
Value:
&&NS(t, eq)(&self_1->n, &self_2->n)

Definition at line 4 of file eq.h.