Add new macro to test method1 or method2 in oplist

This commit is contained in:
Patrick Pelissier committed 2020-06-25 22:49:08 +02:00
1 parent 81c97682a7
commit c59d585c22
1 file changed
+5
+5
View File
@@ -2628,6 +2628,11 @@ m_core_parse2_enum (const char str[], const char **endptr)
#define M_IF_METHOD2(method1, method2, oplist) \
M_IF(M_AND(M_TEST_METHOD_P(method1, oplist), M_TEST_METHOD_P(method2, oplist)))
/* Perform a preprocessing M_IF if at least one method exists in the oplist.
Example: M_IF_AT_LEAST_METHOD(HASH, CMP, oplist) (define function with HASH or CMP method, ) */
#define M_IF_AT_LEAST_METHOD(method1, method2, oplist) \
M_IF(M_OR(M_TEST_METHOD_P(method1, oplist), M_TEST_METHOD_P(method2, oplist)))
/* Perform a preprocessing M_IF if both methods exists in both oplist.
Example: M_IF_METHOD2_BOTH(HASH, INIT, oplist1, oplist2) (define function with HASH & INIT method, ) */
#define M_IF_METHOD2_BOTH(method1, method2, oplist1, oplist2) \