diff --git a/m-core.h b/m-core.h index a8eac078..7c263851 100644 --- a/m-core.h +++ b/m-core.h @@ -4010,13 +4010,14 @@ m_core_parse2_enum (const char str[], const char **endptr) or with the user provided init_func */ #define M_EMPLACE_CALL_FUNC(prefix, init_func, oplist, dest, emplace_type) \ M_IF(M_KEYWORD_P(INIT_WITH, init_func)) \ - ( \ + (M_EMPLACE_CALL_FUNC_INIT_WITH, M_EMPLACE_CALL_FUNC_USER_PROVIDED) \ + (prefix, init_func, oplist, dest, emplace_type) +#define M_EMPLACE_CALL_FUNC_INIT_WITH(prefix, init_func, oplist, dest, emplace_type) \ /* If INIT_FUNC==INIT_WITH, classic use of INIT_WITH operator */ \ - M_CALL_INIT_WITH(oplist, dest M_EMPLACE_LIST_VAR(prefix, emplace_type) ) \ - , \ + M_CALL_INIT_WITH(oplist, dest M_EMPLACE_LIST_VAR(prefix, emplace_type) ) +#define M_EMPLACE_CALL_FUNC_USER_PROVIDED(prefix, init_func, oplist, dest, emplace_type) \ /* Use the user provided init_func instead (with API transformation) */ \ - M_APPLY_API(init_func, oplist, dest M_EMPLACE_LIST_VAR(prefix, emplace_type) ) \ - ) + M_APPLY_API(init_func, oplist, dest M_EMPLACE_LIST_VAR(prefix, emplace_type) ) /* Generate one or several definitions for the EMPLACE methods using the operator EMPLACE_TYPE to get the suitable user types