tags:

views:

97

answers:

1

hello.

Is there some utility which would allow me to inspect template instantiation? my compiler is g++ or Intel.

Specific points I would like:

  • Step by step instantiation.
  • Instantiation backtrace (can hack this by crashing compiler. Better method?)
  • Inspection of template parameters.

@gf helpd me with simple type printing, http://stackoverflow.com/questions/2885597/c-template-name-pretty-print.

However I am getting into boost phoenix and template level makes it very hard to understand what is going on and I would like intelligent solution

also, if you have some techniques inspecting template instantiation, can you please share them.

Thanks

+4  A: 

With templates we simply don't have clean output facilities and there are no compilers i know of that allow you to directly view template instantiations. The closest i found regarding metaprogram debugging was a paper on Templight.

For now the best utilities seem to be:

Georg Fritzsche
okay, I think you meant mpl::print. I found it in the paper you linked
aaa
A, indeed, thanks.
Georg Fritzsche