r/C_Programming • u/jacksaccountonreddit • Dec 26 '22
Project Convenient Containers: A usability-oriented generic container library
https://github.com/JacksonAllan/CC
16
Upvotes
r/C_Programming • u/jacksaccountonreddit • Dec 26 '22
View all comments
Show parent comment
7
u/jacksaccountonreddit Dec 28 '22 edited Dec 30 '22
Compile-time if
_Genericcan be abused to create compile-time conditional expressions whose type depends on the condition:CC uses this mechanism in various places, e.g. when an API macro must return either a
boolor a pointer to an element depending on the container type.