Go to the source code of this file.
|
#define | NAME derive_c_parameter_self |
| Supporting templates that internally invoke new templates.
|
#define | SELF NAME |
◆ NAME
#define NAME derive_c_parameter_self |
Supporting templates that internally invoke new templates.
Ideally we could do:
#define SELF foo
#pragma push_macro("SELF")
#define SELF NS(SELF, internal_vector)
#pragma pop_macro("SELF")
However, this is not possible, as macros are not eagrely expanded at definition
- We cannot 'save' a macro, and redefine it in using its previous/saved value
To solve this, there are a few options
- For the user to provide names for internally used data structures
- A more complex scheme of stacking internal names (name 1, 2, etc)
- Namespace all macro paramaters (e.g. VECTOR_SELF, HASHMAP_SELF etc)
To keep code simple, but allow definitions to uniformly use SELF:
- We restrict to 1 layer deep - NAME (from user), and INTERNAL_NAME (usage inside a template file, one layer deep).
Definition at line 50 of file def.h.
◆ SELF
Definition at line 51 of file def.h.