Can I trace the process of C++ template Instantiation?

Giovanni Bajo rasky@develer.com
Mon Jul 4 12:38:00 GMT 2005


zheng wang <guangzhouwangzheng@yahoo.com.cn> wrote:

>    How can I trace the process of C++ template
> Instantiation?  I study Loki and some library is very
> complex, so I want to see how gcc compiler instance
> the template class.

The source code for template processing is mostly contained in the file
cp/pt.c. The instantiation happens in the function tsubst_copy_and_build.
You can place a breakpoint there and see what happens within GDB.
-- 
Giovanni Bajo



More information about the Gcc mailing list