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
2
u/[deleted] Dec 27 '22
So there's no way to get typesize out of that struct and extract it from static type info? I was thinking the data object would have a pseudo type that contained enough type information so that one could use typeof to extract things like size and return types statically? Then in the macro do casts and also pass size as an argument so there's no runtime storage and it could be constant folded and inlined. I need to look at the OP's code more. It's just a hunch I had from browsing it.