From: Hartmut Kaiser (HartmutKaiser_at_[hidden])
Date: 2005-02-16 01:21:53
Darren Cook wrote:
> P.S. Even better would be able to write LOGVARS(*) and have
> it log all function parameters and local vars that are
> currently in scope. Is this something that the Wave library
> could do, or does it require a full C++ parser?
For this you'll need a at least a partial C++ parser. That's not possible to
achieve with the preprocessor, because it has no context information about
the preprcessed C++ token stream - it cares for macros and directives only.
Some compilers have a feature though, which allows you to get at the current
function name, though. Perhaps this would be of any help for you?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk