Add WIP prototype for separate generation of declarations and body

instead of just static inline functions.
Implemented for list only (and not for emplace generations)
This commit is contained in:
Patrick Pelissier authored and Patrick Pelissier committed 2023-04-22 13:14:37 +02:00
1 parent 219c62ff5d
commit 8a2549ef67
3 files changed
+296 -336

No files matched your search

+42
View File
@@ -449,6 +449,48 @@ M_BEGIN_PROTECTED_CODE
#define M_UNLIKELY_NOMEM(cond) M_UNLIKELY(cond)
/***************************************************************/
/****************** Function Generation Macro ******************/
/***************************************************************/
/*
* Define the expansion logic to define a public / private / type function
* for inline expansion
*/
#define M_EXPAND_FUNC_INLINE(proto, ...) \
static inline proto __VA_ARGS__
#define M_EXPAND_FUNC_INLINE_PRIVATE(...) \
__VA_ARGS__
#define M_EXPAND_FUNC_INLINE_TYPE(...) \
__VA_ARGS__
/*
* Define the expansion logic to define a public / private / type function
* for inline expansion
*/
#define M_EXPAND_FUNC_DECL(proto, ...) \
extern proto;
#define M_EXPAND_FUNC_DECL_PRIVATE(...)
#define M_EXPAND_FUNC_DECL_TYPE(...) \
__VA_ARGS__
/*
* Define the expansion logic to define a public / private / type function
* for inline expansion
*/
#define M_EXPAND_FUNC_BODY(proto, ...) \
proto __VA_ARGS__
#define M_EXPAND_FUNC_BODY_PRIVATE(...) \
__VA_ARGS__
#define M_EXPAND_FUNC_BODY_TYPE(...)
/***************************************************************/
/****************** Preprocessing Times Macro ******************/
/***************************************************************/