Possible Duplicate:
C++ macro/metaprogram to determine number of members at compile time
is there a way to detect at compile time how many members class has?
I've looked the web but no results.
Possible Duplicate:
C++ macro/metaprogram to determine number of members at compile time
is there a way to detect at compile time how many members class has?
I've looked the web but no results.
There are API's for static analysis tools that could do this. Here at my work I use a product called understand 4 C++. It has a nifty C API, for which I wrote a managed C++/CLI wrapper API. That allows you to write tools using C# to target their API. Using this I have written tools that do things similar to what you want to do.
In your case, you could write a tool, get it to do what you want, and then call this tool as a post build event.
If you search this website for static analysis API's then you will find other useful hits.