C++ Template Metaprogramming - Is it possible to output the generated code?

前端 未结 5 1995
臣服心动
臣服心动 2020-12-01 07:58

I would like to debug some templated code to understand it better.
Unfortunately I\'m new to template metaprogramming and it IS hard for me to get in.

When I try

5条回答
  •  广开言路
    2020-12-01 08:26

    Check my publication on C++ template metaprogram debugging

    From page 6 you can see how it works. For specific purposes you won't need the whole toolchain, it can be done by hand.

    I have put together a Visual C++ add-in where you could place breakpoints etc. but it was rather a proof of concept than a tool for every day use.

    We have been working on a graphical frontend that shows all the instantiations, allows debugging, profiling. Unfortunately we cannot promise any publish date for that tool, as we do it in our quite limited free time.

    UPDATE: the debugger and profiler is available here

    UPDATE: C++Now presentation

提交回复
热议问题