libutil/comparator: support > for generation

Change-Id: Idd40b06c7051b9b0bd4c125359af0eb69996313a
Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
Raito Bezarius
2025-09-20 23:45:41 +02:00
parent ccf3c5e30d
commit 257e910247
+6 -3
View File
@@ -24,6 +24,8 @@
GENERATE_ONE_CMP(prefix, qualification, ==, my_type, args)
#define GENERATE_LEQ(prefix, qualification, my_type, args...) \
GENERATE_ONE_CMP(prefix, qualification, <, my_type, args)
#define GENERATE_GEQ(prefix, qualification, my_type, args...) \
GENERATE_ONE_CMP(prefix, qualification, >, my_type, args)
#define GENERATE_NEQ(prefix, qualification, my_type, args...) \
GENERATE_ONE_CMP(prefix, qualification, !=, my_type, args)
@@ -63,9 +65,10 @@
* ```
*/
#define GENERATE_CMP(args...) \
GENERATE_EQUAL(,,args) \
GENERATE_LEQ(,,args) \
GENERATE_NEQ(,,args)
GENERATE_EQUAL(, , args) \
GENERATE_LEQ(, , args) \
GENERATE_GEQ(, , args) \
GENERATE_NEQ(, , args)
/**
* @param prefix This is for something before each declaration like