Functional programming in C with macro “Higher Order Function” generators

前端 未结 3 1253
后悔当初
后悔当初 2020-12-07 14:59

Pay attention carefully because this is a hell of a question ;-)

I want to use template functions for generic collection actions (like search, foreach, etc.) in C wh

相关标签:
3条回答
  • 2020-12-07 15:27

    A recent question raised quite a few shameless preprocessor abusing libraries.

    0 讨论(0)
  • 2020-12-07 15:42

    For information, the source code of GCC 4.6 implements similar tricks for vectors. Look into its file gcc/vec.h

    0 讨论(0)
  • 2020-12-07 15:45

    If you are on Linux/BSD Unix, take a look at queue(3) and check into /usr/include/sys/queue.h - it's been done before :)

    0 讨论(0)
提交回复
热议问题