sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
PengYu.UT@gmail.com's Avatar

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


Question posted by: PengYu.UT@gmail.com (Guest) on November 8th, 2005 02:05 AM
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

1 Answer Posted
mlimber's Avatar
Guest - n/a Posts
#2: Re: Any package for printing out type information for debugging programs using templates?

Join Bytes! wrote:[color=blue]
> 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[/color]

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...0fce0636fea3f16

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

 
Not the answer you were looking for? Post your question . . .
196,805 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,805 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors