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

Go to the source code of this file.

Macros

#define DERIVE_ORD_MEMBER_GT(t, n)
 
#define DERIVE_ORD_MEMBER_LT(t, n)
 
#define DERIVE_ORD(ID)
 

Macro Definition Documentation

◆ DERIVE_ORD

#define DERIVE_ORD ( ID)
Value:
bool NAME(ID, gt)(ID const* self_1, ID const* self_2) { \
return false NAME(ID, REFLECT)(DERIVE_ORD_MEMBER_GT); \
} \
bool NAME(ID, lt)(ID const* self_1, ID const* self_2) { \
return false NAME(ID, REFLECT)(DERIVE_ORD_MEMBER_LT); \
}
#define NAME(pre, post)
Definition core.h:5
#define ID(type)
Definition hashers.h:17
#define DERIVE_ORD_MEMBER_GT(t, n)
Definition ord.h:4
#define DERIVE_ORD_MEMBER_LT(t, n)
Definition ord.h:5

Definition at line 7 of file ord.h.

7#define DERIVE_ORD(ID) \
8 bool NAME(ID, gt)(ID const* self_1, ID const* self_2) { \
9 return false NAME(ID, REFLECT)(DERIVE_ORD_MEMBER_GT); \
10 } \
11 bool NAME(ID, lt)(ID const* self_1, ID const* self_2) { \
12 return false NAME(ID, REFLECT)(DERIVE_ORD_MEMBER_LT); \
13 }

◆ DERIVE_ORD_MEMBER_GT

#define DERIVE_ORD_MEMBER_GT ( t,
n )
Value:
|| NAME(t, gt)(&self_1->n, &self_2->n)

Definition at line 4 of file ord.h.

◆ DERIVE_ORD_MEMBER_LT

#define DERIVE_ORD_MEMBER_LT ( t,
n )
Value:
|| NAME(t, lt)(&self_1->n, &self_2->n)

Definition at line 5 of file ord.h.