views:

284

answers:

2

Hi, does anybody know a library similar to boost::preprocessor (maybe not so advanced) that could be easily used/incorporated in plain C projects? Of course, the most (all ?) of boost::preprocessor is usable when writing in C but I would prefer a small library with only basic capabilities that doesn't depend on the monster like boost.

+1  A: 

You can always extract components out of boost using bcp, though, to be honest, i haven't tested that with Boost.Preprocessor yet.
I think you will have a hard time to find other implementations that are as portable as boosts.

Georg Fritzsche
+1  A: 

I suggest you use Boost.Preprocessor. Don't think i haven't read your question entirely. I suggest you use Boost.Preprocessor alone, not the whole boost package. In order to do that, you can use a small utility called bcp which lets you extract the libraries that you need, in your case Boost.Preprocessor.

Benoît