diff --git a/m-core.h b/m-core.h index 48664eca..7e33b2c9 100644 --- a/m-core.h +++ b/m-core.h @@ -2666,10 +2666,15 @@ m_core_hash (const void *str, size_t length) /* Initialize the container 'dest' as per 'oplist' - and fill it with the given VA arguments */ + and fill it with the given VA arguments. + NOTE: If the REVERSE operator exists, it is a list, + so reverse the final order. +*/ #define M_INIT_VAI(oplist, dest, ...) \ (void)(M_GET_INIT oplist (dest) , \ - M_MAP2_C(M_INIT_VAI_FUNC, (dest, M_GET_PUSH oplist) , __VA_ARGS__)) + M_MAP2_C(M_INIT_VAI_FUNC, (dest, M_GET_PUSH oplist) , __VA_ARGS__) \ + M_IF_METHOD(REVERSE, oplist)(M_DEFERRED_COMMA M_GET_REVERSE oplist (dest), ) \ + ) #define M_INIT_VAI_FUNC(d, a) \ M_PAIR_2 d (M_PAIR_1 d, a)