I write type-safe generic data structures in C
danielchasehooper.com
I write type-safe generic data structures in C
1–10 of 196 posts
Re: I write type-safe generic data structures in C
#2Re: I write type-safe generic data structures in C
#3Re: I write type-safe generic data structures in C
#4Re: I write type-safe generic data structures in C
#5> One annoying thing about C is that it does not consider these two variables to have the same type
C23 solves that too: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3037.pdf
Supported by latest GCC and Clang, but not by MSVC.
Re: I write type-safe generic data structures in C
#6The key idea here seems to be to use function pointer's type to enforce type safety rather than using the data "handle" type (that is often found in implementations inspired by Sean Barrett's strechy_buffers). > One annoying thing about C is that it does not consider these two variables to have the same type C23 solves that too: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3037.pdf Supported by latest GCC and Cl…
Re: I write type-safe generic data structures in C
#7Re: I write type-safe generic data structures in C
#8Re: I write type-safe generic data structures in C
#9e.g. hash table wrapper: https://github.com/FRRouting/frr/blob/master/lib/typesafe.h#...
(cf. https://docs.frrouting.org/projects/dev-guide/en/latest/list...)