Subject: [boost] [preprocessor metaprogramming] tools
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-07-05 03:02:50
I've noticed preprocessor metaprogramming has become more
popular of late, both as a means to provide a cleaner alternative
interface to a library (e.g. the DEFINE and ADAPT macros in
Boost.Fusion or the proposed macro wrappers for Boost.TypeErasure)
and as a means to emulate new language features (e.g.
Boost.LocalFunction, Boost.Generic, and Boost.Contract).
Sadly, IDE support for writing macro metaprograms is fairly poor
in comparison to IDE support for writing regular C++ code.
I wanted to share with you something I've found very useful for
tracing/debugging macro metaprograms: the Eclipse CDT IDE has a
"macro stepper" that allows you to step through the expansion of
a macro step-by-step from the initial invocation to the final
expansion. (This feature can be accessed by using the "Explore
Macro Expansion" context menu item on a macro invocation.)
I would be curious to hear what tools you have found useful for
writing or debugging macro metaprograms.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk