[ccan] [PATCH 0/5] cppmagic: Preprocessor tricks

David Gibson david at gibson.dropbear.id.au
Wed Jan 27 22:39:56 AEDT 2016


ccan already has cpp macros used in some interesting ways.  This
module is far more interesting.. or possibly horrifying.

It includes some very fancy preprocessor techniques described in the
article at:
    http://jhnet.co.uk/articles/cpp_magic

This includes preprocessing time evaluated conditionals, (sort of)
recursion and iteration across the parameters of varargs macros.

David Gibson (5):
  cppmagic: New module
  cppmagic: Logical operations
  cppmagic: Conditionals
  cppmagic: Allow multiple and deferred evaluation
  cppmagic: Iteration

 ccan/cppmagic/LICENSE    |   1 +
 ccan/cppmagic/_info      |  30 ++++++++
 ccan/cppmagic/cppmagic.h | 191 +++++++++++++++++++++++++++++++++++++++++++++++
 ccan/cppmagic/test/run.c |  92 +++++++++++++++++++++++
 4 files changed, 314 insertions(+)
 create mode 120000 ccan/cppmagic/LICENSE
 create mode 100644 ccan/cppmagic/_info
 create mode 100644 ccan/cppmagic/cppmagic.h
 create mode 100644 ccan/cppmagic/test/run.c

-- 
2.5.0



More information about the ccan mailing list