3 ms·
C sort-of-does have a template facility through macros. Some things about it are awkward - e.g., if you need to generate identifiers (which is traditionally don
by beagle3 13y ago
C sort-of-does have a template facility through macros. Some things about it are awkward - e.g., if you need to generate identifiers (which is traditionally done with __LINE__, which is not safe) - but it can mostly give you what templates do, if you know what you are doing.