By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,905 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,905 IT Pros & Developers. It's quick & easy.

Any package for printing out type information for debugging programs using templates?

P: n/a
I found that it is extremely unproductive to debug programs using
templates a lot. Although I could manually define some types to help
printing out type informations, it is still tedious for me. Are there
any package available for this purpose?

Thanks,
Peng

Nov 8 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Pe*******@gmail.com wrote:
I found that it is extremely unproductive to debug programs using
templates a lot. Although I could manually define some types to help
printing out type informations, it is still tedious for me. Are there
any package available for this purpose?

Thanks,
Peng


You could use the typeid operator and std::cout. The content returned
by type_info::name() is implementation-defined, but it might be
sufficient for your needs.

Also, you might consider using the script mentioned in response to one
of your previous questions on templates:

http://groups.google.com/group/comp....fce0636fea3f16

It generates classes from template definitions so you can see the final
product, though it won't work with all modern template features.

Cheers! --M

Nov 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.